Page 1 of 1

File line

Posted: 05 Dec 2017, 14:56
by HIAC
How can I delete first line of text file, and the move 2nd line to position 1?

Re: File line  Topic is solved

Posted: 05 Dec 2017, 15:17
by garry
example removes 1st line

Code: Select all

f1=%a_scriptdir%\test1.txt
FileRead, File,%f1%
newfile:=SubStr(file,InStr(file,"`n")+1)
FileDelete,%f1%
FileAppend, %newfile%,%f1%
run,%f1%
return

Re: File line

Posted: 05 Dec 2017, 15:52
by HIAC
Thats it! Thank you so much