I am new to batch files and need some help. I want to do the following.
I created a batch file that is looking for the folder "Recordings" within the file system and writes the results to a text file (results.txt). After that it is looking for the string "Directory" within the results. I want then merge every line from findstr (every path) with the execution-command of a tool I am using.
@echo off dir /S Recordings > C:\testing\results.txt findstr Directory C:\testing\results.txt PAUSE
The output looks like this:
C:\testing>batchfile.bat Directory of C:\testing\Scenarios\Default Directory of C:\testing\Scenarios\test1 Press any key to continue . . .
Now I want every line of this output to be merged with my execution-command:
tool.exe -parameter C:\testing\Scenarios\Default\Recordings tool.exe -parameter C:\testing\Scenarios\test1\Recordings