Redating from file name

AlainB
Posts: 103
Joined: 13 May 20 10:33

Redating from file name

Post by AlainB »

Some pictures have no date set in the metadata, but the date is encoded in the file name (for example IMG-20210811.jpg)

With the command line exiftool one can set the datetimeoriginal from the file name

exiftool "-datetimeoriginal<filename" IMG-20??????.*jpg

will set the date of all files selected by the pattern IMG-20??????.*jpg

Is is possible to do something similar from Photo Supreme, like redating (using the file name) all selected files ?
G8DHE
Posts: 704
Joined: 21 Aug 17 12:58

Re: Redating from file name

Post by G8DHE »

Why not call EXIF from within PSU with the required command line ?
This will then pass all the file names and the defined command to EXIF as an external application, once EXIF has finished then you can re-sync the images selected within PSU. I have the default(-k) set up but it can be changed as needed;
exif-command.jpg
exif-command.jpg (104.02 KiB) Viewed 3301 times
Geoff Mather (G8DHE)
Hert
Posts: 7870
Joined: 13 Sep 03 6:24

Re: Redating from file name

Post by Hert »

This could help?
viewtopic.php?t=27839
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
AlainB
Posts: 103
Joined: 13 May 20 10:33

Re: Redating from file name

Post by AlainB »

G8DHE wrote: 13 Feb 24 17:13 Why not call EXIF from within PSU with the required command line ?
This will then pass all the file names and the defined command to EXIF as an external application, once EXIF has finished then you can re-sync the images selected within PSU. I have the default(-k) set up but it can be changed as needed;
exif-command.jpg
Thank you for the suggestion, I have to find how to add exiftool ( a perl script) to the PtotoSupreme external applications (I am using a MacBookPro) and how to pass arguments from PhotoSupreme.
RobiWan
moderator
Posts: 221
Joined: 03 Nov 17 8:14

Re: Redating from file name

Post by RobiWan »

AlainB wrote: 16 Feb 24 10:26 I have to find how to add exiftool ( a perl script) to the PtotoSupreme external applications
Why not use exiftool outside PSU? I didn't know any reason why such a tool should necessarily be started from PSU
snowman1
Posts: 394
Joined: 01 Jan 07 2:13

Re: Redating from file name

Post by snowman1 »

Hert wrote: 14 Feb 24 7:41 This could help?
viewtopic.php?t=27839
And also this one: viewtopic.php?t=29314
AlainB
Posts: 103
Joined: 13 May 20 10:33

Re: Redating from file name

Post by AlainB »

RobiWan wrote: 16 Feb 24 18:49
AlainB wrote: 16 Feb 24 10:26 I have to find how to add exiftool ( a perl script) to the PtotoSupreme external applications
Why not use exiftool outside PSU? I didn't know any reason why such a tool should necessarily be started from PSU
IMHO It would be more straightforward to call exiftool from PSU:
- select pictures in PSU
- call exiftool
- convert to XMP

If you call exiftool from the shell, how will you tell PSU to "convert to XMP" the metadata in the files you just updated (and only those) ?
RobiWan
moderator
Posts: 221
Joined: 03 Nov 17 8:14

Re: Redating from file name

Post by RobiWan »

AlainB wrote: 17 Feb 24 20:21 If you call exiftool from the shell, how will you tell PSU to "convert to XMP" the metadata in the files you just updated (and only those) ?
I never do it like that. First I create a list of the files I want to change. I always call ExifTool from a shell, change the data I want and at the end in PSU "read Metadata from File". This makes all what I want and need.
AlainB
Posts: 103
Joined: 13 May 20 10:33

Re: Redating from file name

Post by AlainB »

If I were to use the shell, I would write a shell script that goes through all files with a given pattern (using the "find" command) , check if the date timeoriginal is set and if not set it according to the file name.
AlainB
Posts: 103
Joined: 13 May 20 10:33

Re: Redating from file name

Post by AlainB »

G8DHE wrote: 13 Feb 24 17:13 Why not call EXIF from within PSU with the required command line ?
This will then pass all the file names and the defined command to EXIF as an external application, once EXIF has finished then you can re-sync the images selected within PSU. I have the default(-k) set up but it can be changed as needed;
exif-command.jpg
My computer is a MacBookPro and there is unfortunately no executable version of exiftool for OSX, only a command line version. The executable version exists only for Windows.
RobiWan
moderator
Posts: 221
Joined: 03 Nov 17 8:14

Re: Redating from file name

Post by RobiWan »

AlainB wrote: 26 Feb 24 17:36 only a command line version.
ExifTool is always command line tool.
AlainB
Posts: 103
Joined: 13 May 20 10:33

Re: Redating from file name

Post by AlainB »

According to "ExifTool by Phil Harvey" webpage

ExifTool is a platform-independent Perl library plus a command-line application

ExifTool is also available as a stand-alone Windows executableThe stand-alone Windows executable does not require Perl. Just download and un-zip the archive then double-click on "exiftool(-k).exe" to read the application documentation, drag-and-drop files and folders to view meta information
RobiWan
moderator
Posts: 221
Joined: 03 Nov 17 8:14

Re: Redating from file name

Post by RobiWan »

I'm sorry it make no sense

"The MacOS package installs the ExifTool command-line application and libraries in /usr/local/bin. After installing, type "exiftool" in a Terminal window to run exiftool and read the application documentation."

I was very long time Mac user.
AlainB
Posts: 103
Joined: 13 May 20 10:33

Re: Redating from file name

Post by AlainB »

If always means "always with MacOS" you are right, ExifTool is always (a) command line tool.

G8DHE suggestion was for Window.
RobiWan
moderator
Posts: 221
Joined: 03 Nov 17 8:14

Re: Redating from file name

Post by RobiWan »

AlainB wrote: 28 Feb 24 13:43 G8DHE suggestion was for Window.
No, his suggestion was OS Independent. You can put in this menu each App is OS executable.
Post Reply