Patrick O'Dea
asked on
Batch : Loop thru text file (with wild card) and move any matching files to parent folder.
Loop thru text file (with wild card) and move any matching files to parent folder.
1. I have one file called find.txt with data similar to the follow format.
ABC123
DEF123
HIJ123
KPI123
123456
2. I want a batch script to loop thru this text file and ALSO loop thru every file in current folder.
3. If match found (using wildcards - asterisk ) then move file to parent folder.
4. Example:
File ABC123xxxxx.pdf is a match to the first line of my find.txt file "*ABC123* - and should be moved to parent folder.
Similarly, file XXX_DEF123_XXX.pdf would also be a match to "DEF123" in find.txt.
WHat is the batch script ??
THanks all!
1. I have one file called find.txt with data similar to the follow format.
ABC123
DEF123
HIJ123
KPI123
123456
2. I want a batch script to loop thru this text file and ALSO loop thru every file in current folder.
3. If match found (using wildcards - asterisk ) then move file to parent folder.
4. Example:
File ABC123xxxxx.pdf is a match to the first line of my find.txt file "*ABC123* - and should be moved to parent folder.
Similarly, file XXX_DEF123_XXX.pdf would also be a match to "DEF123" in find.txt.
WHat is the batch script ??
THanks all!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!!