tintin92 Posted June 24, 2005 Posted June 24, 2005 Hello, How to append the content from one file at a other file ? Thanks in advance. Tintin92 Tintin92
JSThePatriot Posted June 24, 2005 Posted June 24, 2005 Use a a couple of the functions in the helpfile is probably the easiest way to do this. Just use the example below. It is tested and works. Just change the filenames to suit your needs. Dim $fileR, $fileA;$file(R)ead and $file(A)ppend Dim $fileRCon;$file(R)ead(Con)tents $fileR = FileOpen("output.txt", 0);Open read only mode. If $fileR = -1 Then MsgBox(0, "Error", "Unable to open $fileR") Exit EndIf $fileRCon = FileRead($fileR, FileGetSize("output.txt"));Read entire file into variable FileClose($fileR);Close file $fileA = FileOpen("swfout.txt", 1);Open in append to end mode. If $fileA = -1 Then MsgBox(0, "Error", "Unable to open $fileA") Exit EndIf FileWrite($fileA, $fileRCon) FileClose($fileA) Also just for next time. Try to make an attempt. I am bored otherwise I would have just told you to look in the help file at the above functions. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
trids Posted June 27, 2005 Posted June 27, 2005 Or ..RunWait( @COMSPEC & " /c COPY c:\a.txt + c:\b.txt c:\output.txt", "", @SW_HIDE ) HTH
JSThePatriot Posted June 27, 2005 Posted June 27, 2005 Or ..RunWait( @COMSPEC & " /c COPY c:\a.txt + c:\b.txt c:\output.txt", "", @SW_HIDE )HTH <{POST_SNAPBACK}>Ah but who wants to do that when you can recreate the wheel? JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now