I need to search all the files in a directory for a word and then move those files that have the word to one directory and all the files without the word to a different directory.
:: ========================================== :: :: sandi.bat Sat 19-05-2012 18:17:53.07 @echo off & setLocal enableDELAYedeXpansioN for /f "tokens=* delims= " %%a in ('dir/b *.txt') do ( find "word" < "%%a" > nul if errorlevel 1 ( echo move "%%a" nope ) else ( echo move "%%a" found ) ) ::===========================================
=====================================
Life is too important to be taken seriously.M2
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |