So here is the example that can be used in sorting LOGs of different applications or downloaded files, or in other suitable cases. The script searches for the given phrase in all text files placed in the current folder, and if the phrase is found, the file that contains it is replaced to the specified folder.@echo off
for %%i in (*.txt) do (
find "first phrase" "%%i" > nul && MOVE "%%i" 1
find "second phrase" "%%i" > nul && MOVE "%%i" 2
rem Add here your phrases.
)
Hope this script will be useful for you.
No comments:
Post a Comment