possible to specify '-Directory<CreateDate' and '-filename<CreateDate'?

Started by gnychis, March 21, 2016, 03:27:13 PM

Previous topic - Next topic

gnychis

I am trying to re-organize my photo library by copying pictures in to YEAR/MONTH directories and I want the files to be renamed with their EXIF creation date and time.

I am able to copy all of my pictures to YEAR/MONTH directories with:


exiftool -o . '-Directory<CreateDate' -d /cygdrive/d/Content/Pictures/%Y/%m -r /cygdrive/d/Content/GroupedPictures


However, I was wondering if it's possible to combine that with something like this:


'-filename<CreateDate' -d %y%m%d_%H%M%S%%-c.%%le


to be able to create directories and rename the files in the same command?  Adding it to the previous command causes nothing to happen (no files copied).

Phil Harvey

Yes.  You may write a directory and file name together.  See example 6 on the Writing FileName page for an example.

The reason that it didn't work when you combined your two commands is because you can only have one -d option.  But the ability to also specify a directory when writing FileName gets around this.

- 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 ($).

gnychis

Thanks so much, Phil.  That worked perfectly.  Just donated to you on PayPal for the quick response and awesome tool that is saving me a lot of time.