I created a small batch to search for strings in text files and the files that contain this string are moved to a folder created next, at least that's how it should work, does anyone know what it is?
Commands
@echo off
Echo FIND STRING AND MOVE FILES TO FOLDER
Echo.
set /p word=Search for:
set /p folder=Folder Name:
md %folder%
FOR /f "tokens=*" %%a IN ('FINDSTR /i /m "%word%" "*.txt"') DO (
IF %ERRORLEVEL% equ 0 MOVE %%a %folder% > Nul
Echo Done!
}
pause
Files to Move to Folder
https://i.stack.imgur.com/lPDuc.png
Thanks!