Newbie Question about copying files

Started by edison400, February 25, 2013, 10:34:06 PM

Previous topic - Next topic

edison400

Hello, I would like to know if this utility can do the following (maybe in a bat file as well), because I have searched high and low for a program to do the following but was never successful

recursively scan an entire directory for picture (specifically jpg)
look for any keywords that have been added (Windows tags that you can enter at the bottom of an explorer window)
Copy the file to a new directory based on said keywords, if no folder exists create one

Example
C:\originalpicture\test.jpg
finds the keywords       Jane;Bob;1999;birthday
copy that picture to the following folders
C:\bob
C:\jane
C:\1999
C:\birthday
go on to the next picture

I know it's a lot to ask, and the only program that i found to come close to do it was photomove(which uses this program) but it only looks at dates. Any help would be much appreciated as I know only a rudimentary amount of command prompt and the most complicated thing i made was a bat script to auto rename mp3s

Phil Harvey

Sure, ExifTool can do this.  Here is a command that will do this for all images in the current directory ("."):

exiftool "-filename<${keywords;s(, )(/)g}" .

Here I am assuming that your keywords are stored in the IPTC Keywords.  The "s(, )(/)g" part replaces the comma+space's in the Keywords list with slashes so they will become subdirectories.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).