Jump to content

Change file date to date shot


Recommended Posts

This is possibly naive, and may have a simple solution.

It seems that when I process a raw file in APh and save that as an affinity  photo file, the file date is the date that I first saved that APh file, not the date shot

I would like to batch change this date to the "date shot", which still exists within the exif data

Is there any way to do this?

Could a macro be created to do this?

Link to comment
Share on other sites

16 minutes ago, kirkt said:

Maybe EXIFTool can help,

It can't help. It would need to understand the Affinity file format, but that is proprietary and undocumented.

-- Walt

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.6.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

Link to comment
Share on other sites

exiftool "-FileCreateDate<CreateDate" -r *.jpg

The -r switch applies recursion so it will work on lower directories. If you're using a Mac I think that single quotes are required

The example below was run from the Metadata level and altered file dates there and in the subs

OldDates.png

Microsoft Windows 10 Home, Intel i7-9750H CPU @ 2.60GHz, 16 GB RAM, 500GB SSD, 1TB Whirlygig, NVIDIA GeForce RTX 2060
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

6 hours ago, David in Яuislip said:

exiftool "-FileCreateDate<CreateDate" -r *.jpg

 

7 hours ago, GrahamMYC said:

and save that as an affinity  photo file

 

Affinity Store: Affinity Suite (ADe, APh, APu) 1.10.5.1342.
Windows 10 Pro, Version 21H1, Build 19043.1586.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200.

Link to comment
Share on other sites

8 hours ago, GrahamMYC said:

This is possibly naive, and may have a simple solution.

It seems that when I process a raw file in APh and save that as an affinity  photo file, the file date is the date that I first saved that APh file, not the date shot

I would like to batch change this date to the "date shot", which still exists within the exif data

Is there any way to do this?

Could a macro be created to do this?

No it's not simple, since you can't change and influence an APh-file's system level date-time stamp from inside of APh, just from outside from the OS file system level. Also I don't know if this is generally a good idea to do in terms of some possible hidden Affinity file format internals then, meaning due to possible backup and incremental internal Affinity file format parts.

1. However, the easiest would be if you save your Affinity files instead with an own added date stamp filename here, so something like ...

  • MyShot-location-2021-02-03.afphoto

... or the like. So you can treat and handle it yourself differently from the system level file date-time stamp.

 

2. Otherwise one possible procedure might be (one would have to test/try out), to save always two files from a developed RAW file, namely the Affinity Photo file and a corresponding JPG file of the same filename part with included meta data. Aka ...

  • Myfile_xyz.afphoto & Myfile_xyz.jpg

... then via external system level scripting and a tool like exiftool extract the date of the .JPG file and "touch" the .AFPHOTO file with that date stamp then. Afterwards the JPG-file can be removed.

 

 

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

7 hours ago, v_kyr said:

No it's not simple, since you can't change and influence an APh-file's system level date-time stamp from inside of APh, just from outside from the OS file system level. Also I don't know if this is generally a good idea to do in terms of some possible hidden Affinity file format internals then, meaning due to possible backup and incremental internal Affinity file format parts.

1. However, the easiest would be if you save your Affinity files instead with an own added date stamp filename here, so something like ...

  • MyShot-location-2021-02-03.afphoto

... or the like. So you can treat and handle it yourself differently from the system level file date-time stamp.

 

2. Otherwise one possible procedure might be (one would have to test/try out), to save always two files from a developed RAW file, namely the Affinity Photo file and a corresponding JPG file of the same filename part with included meta data. Aka ...

  • Myfile_xyz.afphoto & Myfile_xyz.jpg

... then via external system level scripting and a tool like exiftool extract the date of the .JPG file and "touch" the .AFPHOTO file with that date stamp then. Afterwards the JPG-file can be removed.

 

 

I am having difficulty with this. IFor method 1 it is too late to deal with the many files I already ahve. 
For method 2, I am not sure what goes into the xyz element.  Then, how do I use the external exiftool? I shall do a search for some advice, but if you can point me to a source that is understandable to a non expert, then I would be grateful.

Reflecting further on your initial comments, I may not need to alter the file date itself. What I am doing is organising my photos (and other material) in the Daminion data asset manager. need only chnage the creation date withi daminion to achieve the sort on my photos that I want, That still requires that I extract the date shot from the metadata. I have put this problem to Daminion (who are incredibly helpful) so that it can be writtrn to the Daminion date created field. I will point them at exiftool to see if it helps their processes. Thanks for the thoughts. SAny further advice would be welcome. 

Link to comment
Share on other sites

2 hours ago, GrahamMYC said:

I am having difficulty with this. IFor method 1 it is too late to deal with the many files I already ahve. 
For method 2, I am not sure what goes into the xyz element.

"Myfile_xyz" is just an imaginary example name, it was just meant as a placeholder like "DSC_0956.jpg", you can instead choose whatever you name your files.

For the external exiftool see exiftool and how to use it. For example from a command shell ...

  • This will output the name of the file, a tab, and the date&time the image was taken at:
    exiftool -T -FileName -DateTimeOriginal <FILES or DIR>
  • To print out the creation date & time of an image to the console ...
    exiftool -T -createdate <filename>
  • To write out the previous instead into a temp text file ...
    exiftool -T -createdate yourfile.jpg > tmp.txt
  • ... and so on ...
3 hours ago, GrahamMYC said:

Reflecting further on your initial comments, I may not need to alter the file date itself. What I am doing is organising my photos (and other material) in the Daminion data asset manager. need only chnage the creation date withi daminion to achieve the sort on my photos that I want, That still requires that I extract the date shot from the metadata. ...

IMO that would be an overall better way, to let it be handled instead by that "Daminion data asset manager" then, as far as that one offers some options to do so for files and the handling/assigning of date-time stamps.

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

12 hours ago, Pšenda said:
19 hours ago, David in Яuislip said:

exiftool "-FileCreateDate<CreateDate" -r *.jpg

 

20 hours ago, GrahamMYC said:

and save that as an affinity  photo file

Haha, that'll teach me.

Ok, Round 2, the Windows version for ORFs

Exiftool can process the following dates:
[File:System]   FileModifyDate
[File:System]   FileAccessDate
[File:System]   FileCreateDate
[EXIF:IFD0]     ModifyDate
[EXIF:ExifIFD]  DateTimeOriginal
[EXIF:ExifIFD]  CreateDate

So open a Powershell window in the folder with the raw files and do
exiftool -csv  -CreateDate *.ORF > dates.csv

Open dates.csv in a text editor and you'll see this
SourceFile,CreateDate
P1070001.ORF,2020:01:07 18:26:16
P1070003.ORF,2020:01:07 18:26:51
etc

- change CreateDate to FileCreateDate in the first row
- Replace all .ORF to .afphoto

SourceFile,FileCreateDate
P1070001.afphoto,2020:01:07 18:26:16
P1070003.afphoto,2020:01:07 18:26:51
etc

- Save as UTF-8 & close
- Move the file to the folder with the afphoto files

Open a Powershell window in the folder with the afphoto files and do
exiftool -csv=dates.csv *.afphoto

 

NewDates.png

Microsoft Windows 10 Home, Intel i7-9750H CPU @ 2.60GHz, 16 GB RAM, 500GB SSD, 1TB Whirlygig, NVIDIA GeForce RTX 2060
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

22 minutes ago, David in Яuislip said:

Haha, that'll teach me.

Ok, Round 2, the Windows version for ORFs

Exiftool can process the following dates:
[File:System]   FileModifyDate
[File:System]   FileAccessDate
[File:System]   FileCreateDate
[EXIF:IFD0]     ModifyDate
[EXIF:ExifIFD]  DateTimeOriginal
[EXIF:ExifIFD]  CreateDate

So open a Powershell window in the folder with the raw files and do
exiftool -csv  -CreateDate *.ORF > dates.csv

Open dates.csv in a text editor and you'll see this
SourceFile,CreateDate
P1070001.ORF,2020:01:07 18:26:16
P1070003.ORF,2020:01:07 18:26:51
etc

- change CreateDate to FileCreateDate in the first row
- Replace all .ORF to .afphoto

SourceFile,FileCreateDate
P1070001.afphoto,2020:01:07 18:26:16
P1070003.afphoto,2020:01:07 18:26:51
etc

- Save as UTF-8 & close
- Move the file to the folder with the afphoto files

Open a Powershell window in the folder with the afphoto files and do
exiftool -csv=dates.csv *.afphoto

 

NewDates.png

More questions, I am afraid.

1: Presumably I can substitute NEF or DRG (Nikon Raw) for ORF

2: Sometimes I only have the .afphoto file, not the raw. Presumably I would have to make a temporary jpg file which exiftool could access to extract the date.

3: The date I want to capture is DateShot (see screen shot attached), which does not appear in your list of examples. What EXIF name would that have?

affinity photo screen.jpg

Link to comment
Share on other sites

1 minute ago, GrahamMYC said:

1: Presumably I can substitute NEF or DRG (Nikon Raw) for ORF

2: Sometimes I only have the .afphoto file, not the raw. Presumably I would have to make a temporary jpg file which exiftool could access to extract the date.

3: The date I want to capture is DateShot (see screen shot attached), which does not appear in your list of examples. What EXIF name would that have?

1. Yes

2. Yes. File Name                       : P1070001.jpg shows
            Date/Time Original         : 2020:01:07 18:26:16
            Create Date                     : 2020:01:07 18:26:16

3. exiftool -DateTimeOriginal -CreateDate P1070001.ORF displays the same values for both which was the date/time of shooting

Microsoft Windows 10 Home, Intel i7-9750H CPU @ 2.60GHz, 16 GB RAM, 500GB SSD, 1TB Whirlygig, NVIDIA GeForce RTX 2060
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

13 minutes ago, GrahamMYC said:

More questions, I am afraid.

1: Presumably I can substitute NEF or DRG (Nikon Raw) for ORF

2: Sometimes I only have the .afphoto file, not the raw. Presumably I would have to make a temporary jpg file which exiftool could access to extract the date.

3: The date I want to capture is DateShot (see screen shot attached), which does not appear in your list of examples. What EXIF name would that have?

  1. yes
  2. yes
  3. see "createdate" or take a closer look at the manual/documentation here!

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

v_kyr

In the example which I attached. The date shot was 18-07-2018; but the date created was 22-12-2019. Presumably that is because I did not process the file until end of 2019. I will study the documentation, which I have now downloaded and try to disentangle the problem

I really appreciate your help.

Link to comment
Share on other sites

On 2. 2. 2021 at 6:15 PM, walt.farrell said:

It would need to understand the Affinity file format, but that is proprietary and undocumented.

It is possible to join the request to add *.afphoto format support (at least at the metadata level) to ExifTool.

https://exiftool.org/forum/index.php?topic=8151.0

Affinity Store: Affinity Suite (ADe, APh, APu) 1.10.5.1342.
Windows 10 Pro, Version 21H1, Build 19043.1586.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200.

Link to comment
Share on other sites

 

Affinity Store: Affinity Suite (ADe, APh, APu) 1.10.5.1342.
Windows 10 Pro, Version 21H1, Build 19043.1586.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200.

Link to comment
Share on other sites

On 2/4/2021 at 11:21 AM, Pšenda said:

I have not yet tried again to log into the exiftool forum to log my interest. In the mantime, I would like to report that I have been in discussion with Daminion, a data asset manager program. After looking at the problem they said that they would not be able to extract the "date shot" from the affinity photo is it is not one of their supported formats. I went back to them, and pointed out that Affinity is growing rapidly with three applications (APh,AD, and Pub) operating in 3 environments (Mac, iPad, Windows) interchangeably; and that some months ago Affinity reported more than a million users worldwide. I also gave the person I was communicating with access to my website to illustrate the scope of the apps, and the range of formats that I am trying to include in the Daminion catalogues. I set out below the response I received
quote

image.thumb.png.b772afa8c9212213789892aadd52e39c.png

unquote.

This shows that your suggestion that Affinity user register their interest with exiftool is important, and I would also suggest the users explore the benefits of Daminion as a DAM (data asset manager). I have now integrated  about 20k photos,,  the most recent ones porcessed on APh;  more than a  dozen Logs (early ons processed in Pageplus, and the more recent ones in APub). I also make use of some video. Since the abandonment od MoveiPlus, I have used a varietty of editors including Pwer Director, Da Vinci Resolve, and Luma Fusion. Although the Affitiy suite is not formally supported by Daminion, it is possible to specify the file extensions to  be accepted, and thereafter it accepts the Affinity family (although the file type displayed can default to "unknown". Otherwise it works well.Indeed, it seems to me that Serif's DAM project has slipped so much that they might do better to "do a deal" with Daminion and concentrate their resources on developing the Affinity triumvarate. 
Although loading files into Daminion can be a slow process (if there are many), the speed of ersponse ,once loaded,  is amazing. 
So, I have reached the File Date Proposal.pdfthat instead of tryim to develop a workaround on my problem, I shall seek to get Serif to look at the issues I have raised, and encourage them to engage with the Daminion team whO I have found to be very helpful . 
I attach a short note in which I try to explain what I am trying to achieve and wy. In the near future (but not immediately) I will try to produce a video demonstrating the use and performance of Daminion. image.thumb.png.b772afa8c9212213789892aadd52e39c.pngimage.thumb.png.b772afa8c9212213789892aadd52e39c.pngFile Date Proposal.pdf

 

image.png

Link to comment
Share on other sites

I have had further discussions with Daminion and have recently received the following

quote

Hi Graham, 

 
Thank you for the detailed description! The problem might, indeed, be related to the fact that affinity files are not natively supported by Daminion. We have registered the request to add the native support, but we need to get more user requests before adding it to our roadmap. Adding new format support is a pretty complex task and we need to get more requests to do it. 
 
Kind regards, 
Daria
Un quote
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.