Set date from directory name

Started by RayArdia, December 21, 2011, 11:26:07 AM

Previous topic - Next topic

RayArdia

Hi Phil,
There aren't any sub-directories to '1993', just 13 files within the dir 1993.
I thought I'd get on with some other photos so scanned some 1992 ones into ~/Desktop/1992.
Then:-
ray@ray-Aspire-5735:~$ exiftool '-datetimeoriginal=1992:09:10 00:00:00' ~/Desktop/1992
    1 directories scanned
   12 image files updated
So everything was normal as previously - so the tried:-
ray@ray-Aspire-5735:~$ exiftool '-datetimeoriginal=19932:09:10 00:00:00' ~/Desktop/1993
    1 directories scanned
   13 image files updated
ray@ray-Aspire-5735:~$    and the thirteen files I was having problems with are now "tooled-up" with the required metadata. I have no idea what happened but it seems to have sorted itself out.

So sorry to have bothered you, and thanks again for trying to put me straight.
Ray

Phil Harvey

Hi Ray,

In your directory listing, none of the files had ".jpg" extensions.  In fact, they didn't have extensions at all (they had names like "1993-0"), so I had assumed they were sub-directories.

ExifTool only processes files with recognized extension when processing a directory.  So for this to work, either the file names must have changed to include the extensions, or you changed your command to specify the files explicitly instead of the directory (ie. "~/Desktop/1993/*" instead of "~/Desktop/1993").

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