Reputation: 69
Hello i have this script:
batch.bat:
@Echo off
SETLOCAL ENABLEDELAYEDEXPANSION
for /f "tokens=*" %%g in (files.txt) do (
SET File=%%g
ECHO SET SearchStr=!File! > temp1.bat
Type temp1.txt >> temp2.bat
Start temp2.bat
TIMEOUT /t 1 /nobreak > NUL
Del temp2.bat
)
temp1.bat:
findstr "%SearchStr%" paths.txt >> FilePaths.txt
exit
I have more than 3000 lines in "files.txt" so it takes about 50min which works but would be better if it could go quicker, do you have any ideas that could help?
Upvotes: 0
Views: 38
Reputation: 37589
the example of your question is not clear. You might try:
findstr /ig:files.txt paths.txt > FilePaths.txt
Upvotes: 1