How to batch move files selected by one tag to one folder

Started by Leven, September 26, 2017, 09:15:23 AM

Previous topic - Next topic

Leven

Hi, I want to copy tiff files from one directory (with subfolders) to one single folder. But only those tiffs with the tag ProfileCMMType with the entry "lino". I want to create a windows batch file for this task but I simply do not now how to write it correctly. I ended up with the following:

ECHO OFF
%~f1
C:\TIFF_TOOLS\EXIFTOOLGUI\exiftool.exe %~f1 -r -ext tif -if "$ProfileCMMType =~ /lino/"


I think the condition is o.k. but how to move the files into the following folder C:\temp\copies ?

Help would be greatly appreciated!
Thank you
Leven

StarGeek

You are using move and copy interchangeably but they are two different things. Do you wish to move the files, removing them from their original location or do you wish to make new copies of the files?
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Leven

Hi StarGeek,

I want to move the files and remove them from their original location.

Thanks
Leven

StarGeek

In that case add -Directory=C:\temp\copies to your command.

See Writing "FileName" and "Directory" tags for more details.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Leven