Hi Community,
I have 100s of word documents (.doc [2003 version]), i need to search each of them in loop for a particular word, and collect that line in a word document.
Thanks in advance for your help and support. :clap:
CODE FOLLOWS:
#persistent #SingleInstance Force SetBatchLines, -1 FolderToSearchFor = c:\abc OutPutFolder = c:\def needle = %NeedleContent% FileRecycle, %OutPutFolder%\FileName.txt Loop, %FolderToSearchFor%\*.doc, , 1 { Loop, read, %A_LoopFileFullPath% { If A_LoopReadLine contains >< continue If A_LoopReadLine contains %needle% { FileAppend, %A_LoopReadLine%`n, %OutPutFolder%\FileName.txt } } }