i have a problem. I'm struggeling to get a specific line from a folder full of textfiles to add in a new text file!
The Problem is that with the code below the script only weites 9 times the right line (from the first 9 textfiles) to the new document. after that the script rewrites the other lines with lines from the first textfiles
Code: Select all
FileDelete, temp_scr.txt
Loop, temp\*.*, ,1
{
Loop, read, %A_LoopFileFullPath%, temp_scr.txt
IfInString, A_LoopReadLine, nextline ; nextline is the needle in the textfiles
{
FileAppend, %A_LoopReadLine%`n
break ;> max 9 times, then overwrite from line 1 again!
}
}
sry for my bad english i hope you understand my problem. I wand to loop through a folder full of textfiles, search for a specific word in each of these textfiles and add the lines with this specific word to a new textfile.
thank you for your help!