I have been reading great posts in this forum and got close to what I want to do but couldn’t figure out the exact code.
I want to create a windows batch file to do following:
- Perform a looped search for each line item of a text file (this is a list of keyword) to locate files in a a specific directory
- For this search partial match is okay.
- Each time a file is found, move it to a predefined directory (e.g. C:\temp\search_results)
Thanks.
There are multiple problems.
FIND /i “%A%” … can’t work, the name of the FOR-Varibale is %%A
And the second proble: With FIND you check the content of the file not the name.
And you should use indention to avoid too much parenthesis.
You better try
It tries to replace %%A inside of the filename with .
If the replaced is not equal the filename, the filename must contain %%A