chrisT Posted June 22, 2006 Posted June 22, 2006 I have looked, leaving almost no stone unturned, does abody know a simple way, not just to filewriteline or filewrite, but to append an entire text file to another textfile, perhaps ClipPut/ClipGet with a $string variable, sorry I'm very new here, forgive my ignorance.
seandisanti Posted June 22, 2006 Posted June 22, 2006 I have looked, leaving almost no stone unturned, does abody know a simple way, not just to filewriteline or filewrite, but to append an entire text file to another textfile, perhaps ClipPut/ClipGet with a $string variable, sorry I'm very new here, forgive my ignorance. you could just.... $file1 = FileRead("c:\file1.txt") $file2 = FileOpen("C:\file2.txt",1) FileWrite($file2,@CR & $file1)
chrisT Posted June 22, 2006 Author Posted June 22, 2006 you could just.... $file1 = FileRead("c:\file1.txt") $file2 = FileOpen("C:\file2.txt",1) FileWrite($file2,@CR & $file1)cameronsdad Great!! thx for your quick response u make this look easy.....
seandisanti Posted June 22, 2006 Posted June 22, 2006 (edited) cameronsdad Great!! thx for your quick response u make this look easy.....no problem man, i'm always glad to help. and it just gets easier and easier as you go along.***edit***P.S. Welcome to the forum Edited June 22, 2006 by cameronsdad
Vinod Posted August 3, 2006 Posted August 3, 2006 Hi, I am getting an error message when I used this code , for appending the files. Actually for "FileRead" we need to give one more parameter that is the "count". I need to append the whole file to another. How can I do this ? Could some one help ? Vinod
JSThePatriot Posted August 3, 2006 Posted August 3, 2006 Yea certainly. He just wrote some quick apparently psuedo code. $file1 = FileRead("c:\file1.txt", FileGetSize("c:\file1.txt")) $file2 = FileOpen("C:\file2.txt",1) FileWrite($file2,@CR & $file1) FileClose($file2) ;Note: $file1 should close itself due to only using FileRead() I hope this further helps you in your Adventures with AutoIt. 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)
seandisanti Posted August 3, 2006 Posted August 3, 2006 Yea certainly. He just wrote some quick apparently psuedo code. $file1 = FileRead("c:\file1.txt", FileGetSize("c:\file1.txt")) $file2 = FileOpen("C:\file2.txt",1) FileWrite($file2,@CR & $file1) FileClose($file2) ;Note: $file1 should close itself due to only using FileRead() I hope this further helps you in your Adventures with AutoIt. JSactually, my example assumed beta, which has the second parameter as optional with the default value being the entire file. only in 3.1.1 the count is a required parameter. beta is betta'
flyingboz Posted August 3, 2006 Posted August 3, 2006 simple way to concatentate filesconcatanate foo and bar to foo.barcopy foo + bar foo.barORtype foo > foo.bartype bar >> foo.barusing wildcards is also permitted....copy *.foo foofiles"the console is your friend".... Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
JSThePatriot Posted August 4, 2006 Posted August 4, 2006 actually, my example assumed beta, which has the second parameter as optional with the default value being the entire file. only in 3.1.1 the count is a required parameter. beta is betta'AutoIt's Beta is definitely better. I didnt know that being an optional param in beta. Thanks for the tip. I'll remember that.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)
seandisanti Posted August 10, 2006 Posted August 10, 2006 AutoIt's Beta is definitely better. I didnt know that being an optional param in beta. Thanks for the tip. I'll remember that.JSThanks a lot for all the inputs..Always glad to help
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