File renaming works sometimes

Started by BigBlueBeast, August 16, 2017, 01:26:06 PM

Previous topic - Next topic

BigBlueBeast

Performing a bunch of digital photo maintanence after a drive crash including renaming, when I use the following command line:

exiftool -r "-filename<CreateDate" -d %a_%m-%d-%Y_%H%M%S%%-c.%%e -ext jpg -ext dng -ext tiff -ext gif -ext psd . -progress -v4 > rename_log.txt 2>&1

It works most the time now that removed the spaces from file names, when it does not I see the following logged and not sure why this is, any idea?

Sample of logged results with a worked and a failed:

======== ./PhotoWeb2003/Animals/Our Pets/Contessa/Thu,-08-29-2002_094759%-c.jpg [62/26195]
Setting new values from ./PhotoWeb2003/Animals/Our Pets/Contessa/Thu,-08-29-2002_094759%-c.jpg
Writing File:FileName
Writing File:FileName
'./PhotoWeb2003/Animals/Our Pets/Contessa/Thu,-08-29-2002_094759%-c.jpg' --> './PhotoWeb2003/Animals/Our Pets/Contessa/Thu_08-29-2002_094759.jpg'
    + FileName = './PhotoWeb2003/Animals/Our Pets/Contessa/Thu_08-29-2002_094759.jpg'
======== ./PhotoWeb2003/Animals/Our Pets/Contessa/Wed,-01-05-2011_120640-005.jpg [63/26195]
Setting new values from ./PhotoWeb2003/Animals/Our Pets/Contessa/Wed,-01-05-2011_120640-005.jpg
Nothing changed in ./PhotoWeb2003/Animals/Our Pets/Contessa/Wed,-01-05-2011_120640-005.jpg

The next challenge is to see if way to do a bulk refresh of thumbnails as see some corrupted but not seeing way to basically drop and create fresh thumbnails with your tool

Dave

Phil Harvey

Hi Dave,

CreateDate must exist in the file for the command to succeed.

If it doesn't, you may be able to use some other date/time information.

Use this command to see what is available:

exiftool -a -G1 -s -time:all 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 ($).

BigBlueBeast

That helped, looks like got a bunch of them really corrupted bad as this comparison shows:

======== ./PhotoWeb2004/Trips and Travels/Fort Worden Aug 2004/Day 2/Wed_08-25-2004_125337.jpg
[System]        FileModifyDate                  : 2004:08:25 12:53:37-07:00
[System]        FileAccessDate                  : 2017:08:12 17:37:03-07:00
[System]        FileCreateDate                  : 2015:10:11 17:11:09-07:00
[IFD0]          ModifyDate                      : 2004:08:25 12:53:37
[ExifIFD]       DateTimeOriginal                : 2004:08:25 12:53:37
[ExifIFD]       CreateDate                      : 2004:08:25 12:53:37
[GPS]           GPSTimeStamp                    : 19:53:37
[GPS]           GPSDateStamp                    : 2004:08:25
[IPTC]          DateCreated                     : 2004:08:25
[IPTC]          TimeCreated                     : 12:53:37-07:00
[XMP-exif]      DateTimeDigitized               : 2004:08:25 12:53:37-07:00
[XMP-exif]      DateTimeOriginal                : 2004:08:25 12:53:37-07:00
[XMP-exif]      GPSDateTime                     : 2004:08:25 19:53:37Z
[XMP-photoshop] DateCreated                     : 2004:08:25 12:53:37Z
[XMP-xmp]       CreateDate                      : 2004:08:26 13:59:29-08:00
[XMP-xmp]       MetadataDate                    : 2004:11:26 17:04:56-08:00
[XMP-xmp]       ModifyDate                      : 2004:08:25 12:53:37-07:00
[ICC-header]    ProfileDateTime                 : 1998:02:09 06:49:00
[Composite]     DateTimeCreated                 : 2004:08:25 12:53:37-07:00
[Composite]     GPSDateTime                     : 2004:08:25 19:53:37Z
======== ./PhotoWeb2004/Trips and Travels/Fort Worden Aug 2004/Wed,-01-05-2011_123005-470.jpg
[System]        FileModifyDate                  : 0000:00:00 00:00:00
[System]        FileAccessDate                  : 2015:10:11 17:11:09-07:00
[System]        FileCreateDate                  : 2015:10:11 17:11:09-07:00
[IFD0]          ModifyDate                      : 2011:01:05 12:30:05
[GPS]           GPSTimeStamp                    : 08:00:00
[GPS]           GPSDateStamp                    : 1899:12:30
[XMP-exif]      GPSDateTime                     : 1899:12:30 08:00:00Z
[XMP-xmp]       ModifyDate                      : 2011:01:05 12:30:05
[Composite]     GPSDateTime                     : 1899:12:30 08:00:00Z

Guess will just have to figure out am going to at least try to set the date stamps to correct year adding the CreateDate if missing, dang I hate file corruption especially when originals lost.

Thank you for getting me heading in the right direction