How to rename a file and move it to a different drive and directory based on the -DateTimeOriginal tag when both operations uses a different -D format.
I have created the following @ ArgFile example. it contains the details of what I am trying to do and why it does not work.
If anyone knows how I can do this successfully (does not have to be the same approach), I am all ears.
# EXIFTool ArgFile (windows standalone version 7.06
# Uasge:
# F:\Photos\1980_01_01>exiftool -@ bv_FIXALL.arg -common_args img_0008.jpg
#
# Trying to perform the following tasks:
# 1 Set the IPTC DateCreated: 2007:09:05
# Makes backup of original file
# 2 Sets the following
# IPTC CopyrightNotice: (c) 2007 by Brooks Vaughn. All rights reserved.
# XMP-xmpRights Owner: Brooks Vaughn
# IFD0 Artist: Brooks Vaughn
# File Comment: email BrooksVaughn@xxx.xxx for information, usage, and licensing. All
# 3 Rename File in the following format:
# 2007-0905-163014_100-0008.txt, 2007-0905-163014_100-0008-01.txt,
# 2007-0905-163014_100-0008-02.txt
# 4 Moving the newly renamed file
# - Create a directory (Q:\Photos\2007_09_05)
# - Move the newly renamed file (2007-0905-163014_100-0008.txt) to Q:\Photos\2007_09_05
# where folder "2007_09_05" is created from the DateTimeOriginal TAG
#
# ISSUES
#
# 1 I had to break up into different -EXECUTE sections because each uses a
# different -D (date format) in it's processing.
# 2 I had to envolk using -common_arg otion as each section could not see the
# filename passed to it after the first section executed.
# 3 Unable to get section #4 working within the executation of this file
# because after the filename is changed in Section #3, it is still looking
# for the original filename.
#
# NOTES
#
# 1 There is a case change with the original filename "IMG_0008.JPG"
# was backed up and renamed to "img_0008.jpg_original"
#
# BEGIN Processing
#
# 1 Set the IPTC DateCreated: 2007:09:05
# Makes Backup of Original file
# WORKING
-P
-d
"%Y:%m:%d""
-DateTimeOriginal>DateCreated
-execute
#
# 2 Sets More Data
# WORKING
-P
-d
%Y
-CopyrightNotice<(c) ${DateTimeOriginal} by Brooks Vaughn. All rights reserved.
-Owner=Brooks Vaughn
-Artist=Brooks Vaughn
-Comment=email BrooksVaughn@hotmail.com for information, usage, and licensing. All unauthorized usa
+ge is strictly forbidden.
-execute
#
# 3 Rename File
# WORKING
-P
-d
%Y-%m%d-%H%M%S
-FileName<${DateTimeOriginal}_${filenumber}%.8f%-2c.%ue
-execute
#
# 4 Move the renamed file to New Direct, create if not exists
#
# Works if standalone and envolked using the new file name
# UNABLE to get working. I suspect that it does not know what the
# new filename is so it fails to find a file to move
-d
%Y_%m_%d
-Directory<Q:\Photos\${DateTimeOriginal}
#
# Then End
#
|