combine filename and directory

Started by daboss, April 05, 2018, 02:51:28 AM

Previous topic - Next topic

daboss

Hi

Would someone be so kind to help me combine my two step into one. Currently I have the following. First command renames files and copies into a new directory. Second command works with this copy of renamed files and then copies into a new structure based on Year/Month.

exiftool -r -P -ext .jpg -d '%Y%m%d-%H%M%S-%%f.%%e' '-filename<filemodifydate' '-FileName<DateTimeOriginal'  -o '/PhotoEXIFRename'  '/PhotosSource/'

exiftool -P -ext .jpg  -o '/PhotoEXIFSorted/Unsorted/'  -d /PhotoEXIFSorted/%Y/%m\ %B '-directory<filemodifydate' '-Directory<CreateDate' '-directory<datetimeoriginal' -r '/PhotoEXIFRename'


Thank-you


Phil Harvey

All you have to do is add the final directory to the desired file name in the first command:

exiftool -r -P -ext .jpg -d '/PhotoEXIFSorted/%Y/%m\ %B/%Y%m%d-%H%M%S-%%f.%%e' '-filename<filemodifydate' '-FileName<CreateDate'  '-FileName<DateTimeOriginal'  -o '/PhotoEXIFRename'  '/PhotosSource/'

Here I have also added the CreateDate argument that was missing from the first command.

See example 11 on the Setting FileName page for more information about the precedence of the various ways of specifying the directory.

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

daboss

Thank-you Phil! Getting my head around it now. Great product, well done.