File line Topic is solved

Get help with using AutoHotkey (v1.1 and older) 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: 3770
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 (v1)”

Who is online

Users browsing this forum: blue_fields and 318 guests