Trying to use tagsfromname with I suspect unsupported options

Started by BigBlueBeast, December 06, 2012, 11:11:46 AM

Previous topic - Next topic

BigBlueBeast

Trying to get back original data where original file srcfile name is different from dstfile name. currently using:
exiftool -tagsfromfile "E:\My Pictures\2012\April\04-04, Wed\JPG\%f.jpg" -ALL:All --thumbnailimage -makernotes -make -model -overwrite_original -m -ext jpg -ext tif -v0 -r "."     


Problem 1:
srcfile = 2012-04-04__IMG4360.jpg
dstfile = 2012-04-04__IMG4360 - 9737x3289 396 images.jpg 

Updates just as desired but only if names exact match, any way to update based on partial match where dstfile starts with srcfile name?


Example out put snippet:
E:\My Pictures\Whitnet Web Site Source\TestWeb\exiftest>exiftool -tagsfromfile "E:\My Pictures\2012\April\04-04, Wed\JPG\%f.%e" -ALL:All --thumbnailimage -makernotes -make -model -overwrite_original -
m -ext jpg -ext tif -v0 -r "."
LOADED!
======== ./2012-04-04__IMG4354.JPG
======== ./2012-04-04__IMG4355.JPG
======== ./2012-04-04__IMG4356.JPG
======== ./Panoramas/2012-04-04__IMG4354-3 9737x3289 images0000.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4354-3 9737x3289 images0000.jpg
Nothing changed in ./Panoramas/2012-04-04__IMG4354-3 9737x3289 images0000.jpg
======== ./Panoramas/2012-04-04__IMG4355-5 13579x2996 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4355-5 13579x2996 images.jpg
Nothing changed in ./Panoramas/2012-04-04__IMG4355-5 13579x2996 images.jpg
======== ./Panoramas/2012-04-04__IMG4408-28 52264x2819 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4408-28 52264x2819 images.jpg
Nothing changed in ./Panoramas/2012-04-04__IMG4408-28 52264x2819 images.jpg
======== ./Panoramas/Blocks/2012-04-04__IMG4355-13 10110x5879 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4355-13 10110x5879 images.jpg
Nothing changed in ./Panoramas/Blocks/2012-04-04__IMG4355-13 10110x5879 images.jpg
======== ./Panoramas/Blocks/2012-04-04__IMG4364-2 2366x3126 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4364-2 2366x3126 images.jpg
Nothing changed in ./Panoramas/Blocks/2012-04-04__IMG4364-2 2366x3126 images.jpg
======== ./Panoramas/Blocks/2012-04-04__IMG4541-6 5502x3754 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4541-6 5502x3754 images.jpg
Nothing changed in ./Panoramas/Blocks/2012-04-04__IMG4541-6 5502x3754 images.jpg
======== ./Panoramas/Vertical/2012-04-04__IMG4355-2 3323x5007 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4355-2 3323x5007 images.jpg
Nothing changed in ./Panoramas/Vertical/2012-04-04__IMG4355-2 3323x5007 images.jpg
======== ./Panoramas/Vertical/2012-04-04__IMG4373-35 11907x39453 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4373-35 11907x39453 images.jpg
Nothing changed in ./Panoramas/Vertical/2012-04-04__IMG4373-35 11907x39453 images.jpg
======== ./Panoramas/Vertical/2012-04-04__IMG4552-5 3260x5267 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4552-5 3260x5267 images.jpg
Nothing changed in ./Panoramas/Vertical/2012-04-04__IMG4552-5 3260x5267 images.jpg
    4 directories scanned
    3 image files updated
    9 image files unchanged

Problem 2:
Using the %-:2d2012%d%dJPG\%f.%e would be wonderful if only could figue a way aound it using forward slashes as need the backslashes in Windows.

Any way to get the tagsfromfile to work with wildcard path such as "E:\My Pictures\2012\*.\*.\JPG\%f.%e" or simply put i want to search for srcfiles starting at "E:\My Pictures\2012" recursing the srcfile directory against the current directory command ran from recurisvely

Problem 3:
Alternately any way to use exiftool to recursively perform a file rename equilivant to source of  %f.%e and modify it to be %19f.%e which would eliminate the name issue in problem 1 and once updated could rename %19f.%e to a alternate name such as %19_Pano.%e to prevent possible duplicate names

Open to any batch file ideas on how to get ren *.jpg ???????????????????.jpg (15 ?) to work recursively

Thanks in advance
Dave

Phil Harvey

Problem 1:

You may take a substring of the file name with the %f features, but the result must be an exact match or this won't work.  You are out of luck unless you can apply a rule like truncating the file name at a specific number of characters.

Problem 2:

In Windows, ExifTool will accept either forward or backward slashes.  TagsFromFile doesn't work with wildcards.

Problem 3:

You can truncate filenames like this: exiftool -filename=%19f.%e FILE

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

jackdorsey

Quote from: BigBlueBeast on December 06, 2012, 11:11:46 AM
Trying to get back original data where original file srcfile name is different from dstfile name. currently using:
exiftool -tagsfromfile "E:\My Pictures\2012\April\04-04, Wed\JPG\%f.jpg" -ALL:All --thumbnailimage -makernotes -make -model -overwrite_original -m -ext jpg -ext tif -v0 -r "."     


Problem 1:
srcfile = 2012-04-04__IMG4360.jpg
dstfile = 2012-04-04__IMG4360 - 9737x3289 396 images.jpg 

Updates just as desired but only if names exact match, any way to update based on partial match where dstfile starts with srcfile name?


Example out put snippet:
E:\My Pictures\Whitnet Web Site Source\TestWeb\exiftest>exiftool -tagsfromfile "E:\My Pictures\2012\April\04-04, Wed\JPG\%f.%e" -ALL:All --thumbnailimage -makernotes -make -model -overwrite_original -
m -ext jpg -ext tif -v0 -r "."
LOADED!
======== ./2012-04-04__IMG4354.JPG
======== ./2012-04-04__IMG4355.JPG
======== ./2012-04-04__IMG4356.JPG
======== ./Panoramas/2012-04-04__IMG4354-3 9737x3289 images0000.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4354-3 9737x3289 images0000.jpg
Nothing changed in ./Panoramas/2012-04-04__IMG4354-3 9737x3289 images0000.jpg
======== ./Panoramas/2012-04-04__IMG4355-5 13579x2996 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4355-5 13579x2996 images.jpg
Nothing changed in ./Panoramas/2012-04-04__IMG4355-5 13579x2996 images.jpg
======== ./Panoramas/2012-04-04__IMG4408-28 52264x2819 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4408-28 52264x2819 images.jpg
Nothing changed in ./Panoramas/2012-04-04__IMG4408-28 52264x2819 images.jpg
======== ./Panoramas/Blocks/2012-04-04__IMG4355-13 10110x5879 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4355-13 10110x5879 images.jpg
Nothing changed in ./Panoramas/Blocks/2012-04-04__IMG4355-13 10110x5879 images.jpg
======== ./Panoramas/Blocks/2012-04-04__IMG4364-2 2366x3126 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4364-2 2366x3126 images.jpg
Nothing changed in ./Panoramas/Blocks/2012-04-04__IMG4364-2 2366x3126 images.jpg
======== ./Panoramas/Blocks/2012-04-04__IMG4541-6 5502x3754 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4541-6 5502x3754 images.jpg
Nothing changed in ./Panoramas/Blocks/2012-04-04__IMG4541-6 5502x3754 images.jpg
======== ./Panoramas/Vertical/2012-04-04__IMG4355-2 3323x5007 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4355-2 3323x5007 images.jpg
Nothing changed in ./Panoramas/Vertical/2012-04-04__IMG4355-2 3323x5007 images.jpg
======== ./Panoramas/Vertical/2012-04-04__IMG4373-35 11907x39453 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4373-35 11907x39453 images.jpg
Nothing changed in ./Panoramas/Vertical/2012-04-04__IMG4373-35 11907x39453 images.jpg
======== ./Panoramas/Vertical/2012-04-04__IMG4552-5 3260x5267 images.jpg
Warning: Error opening file - E:\My Pictures\2012\April\04-04, Wed\JPG\2012-04-04__IMG4552-5 3260x5267 images.jpg
Nothing changed in ./Panoramas/Vertical/2012-04-04__IMG4552-5 3260x5267 images.jpg
    4 directories scanned
    3 image files updated
    9 image files unchanged

Problem 2:
Using the %-:2d2012%d%dJPG\%f.%e would be wonderful if only could figue a way aound it using forward slashes as need the backslashes in Windows.

Any way to get the tagsfromfile to work with wildcard path such as "E:\My Pictures\2012\*.\*.\JPG\%f.%e" or simply put i want to search for srcfiles starting at "E:\My Pictures\2012" recursing the srcfile directory against the current directory command ran from recurisvely

Problem 3:
Alternately any way to use exiftool to recursively perform a file rename equilivant to source of  %f.%e and modify it to be %19f.%e which would eliminate the name issue in problem 1 and once updated could rename %19f.%e to a alternate name such as %19_Pano.%e to prevent possible duplicate names

Open to any batch file ideas on how to get ren *.jpg ???????????????????.jpg (15 ?) to work recursively

Thanks in advance
Dave

Thank you! I had similar issues too and this topic helped a lot!