What I want is to create a windows batch file to find in a directory any strings in text files then if match then copy and move to another folder.
This batch file script is what I have so far but it moves all the text files with Weekly words:
for %%a in ( "C:\Users\Scripts\*Weekly.*" ) do (
copy "%%~a" "C:\Users\Scripts"
move "%%~a" "C:\Users\ScriptsTo"
These are my text files in the Source folder:
All I need is to copy and move to Destination folder is with strings contains ONLY "Weekly":
I don't need this file to move:
Is this possible?
Thank you for your help.