File line Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
HIAC
Posts: 111
Joined: 11 Oct 2017, 17:59
Location: Republic of Serbia

File line

05 Dec 2017, 14:56

How can I delete first line of text file, and the move 2nd line to position 1?
garry
Posts: 1931
Joined: 22 Dec 2013, 12:50

Re: File line  Topic is solved

05 Dec 2017, 15:17

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
HIAC
Posts: 111
Joined: 11 Oct 2017, 17:59
Location: Republic of Serbia

Re: File line

05 Dec 2017, 15:52

Thats it! Thank you so much

Return to “Ask For Help”

Who is online

Users browsing this forum: badnecros, Bing [Bot], boiler, Google [Bot] and 213 guests