ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Leven on September 26, 2017, 09:15:23 AM

Title: How to batch move files selected by one tag to one folder
Post by: Leven on September 26, 2017, 09:15:23 AM
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
Title: Re: How to batch move files selected by one tag to one folder
Post by: StarGeek on September 26, 2017, 09:50:29 AM
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?
Title: Re: How to batch move files selected by one tag to one folder
Post by: Leven on September 26, 2017, 09:56:03 AM
Hi StarGeek,

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

Thanks
Leven
Title: Re: How to batch move files selected by one tag to one folder
Post by: StarGeek on September 26, 2017, 10:56:15 AM
In that case add -Directory=C:\temp\copies to your command.

See Writing "FileName" and "Directory" tags (https://exiftool.org/filename.html) for more details.
Title: Re: How to batch move files selected by one tag to one folder
Post by: Leven on September 27, 2017, 02:10:27 AM
Thank you very much! Works great!  :)
Leven