Solved Batch file to Sort and Move specific files by id-ing 1 word.

October 1, 2014 at 06:59:19
Specs: Windows XP
Hi All...
I will explain what I need in as much detail as possible.
I need a batch file to move specific files into a separate folder,possibly by opening my hex editor,searching for the word "body" ( without the quotes ) and if found ,close hex editor,move file to a folder called "moved" ,then go on to the next one.If the word "body" is not found just close hex editor and ignore the file.
I have approx 900 files in a folder.One is a vehicle and one is a map for a game.They are mixed together and the only way of telling them apart is by opening each one with my hex editor and search for the word "body",which means it is a vehicle.If the "body" word is not found,it is a map.Example wording of the files: mapname.idf carname.idf
Manually this process would take hours,even days.
It would be a lot better if there is a way of doing this without using the hex editor/batch idea.
Here is a link to one map and one vehicle file if needed for an example:

Thanks a bunch for your help!

See More: Batch file to Sort and Move specific files by id-ing 1 word.

Report •

October 1, 2014 at 07:52:13
✔ Best Answer
Try this command at prompt

for %j in (*) do find "body" "%j" > nul && move "%j" "Your Folder"

Pay attention Youe Folder must be an existing folder.

Report •

October 1, 2014 at 21:57:31
Thanks a bunch IVO!
Only thing I had to change was the (*) to (*.idf) so I made a batch file with your idea and it worked great:
@echo off
md myfolder
for %%j in (*.idf) do find "body" "%%j" > nul && move "%%j" "myfolder"
Consider this answered.
I appreciate it a bunch!

Report •

Related Solutions

Ask Question