Author Topic: File date not changed when file modified  (Read 10778 times)

0 Members and 1 Guest are viewing this topic.

Rich Pasco

  • Member
  • **
  • Posts: 12
    • View Profile
File date not changed when file modified
« on: 2013-05-31 11:41:48 »
My systems for file backup and synchronization across multiple machines are based on file modification date:  They only transfer files which are newer than their counterparts in the target.

I frequently use the Thumbs Plus "Modify File Info" command (Ctrl-Shift-Q) to add comments (captions) to my JPEG photographs.  Unfortunately by default this command preserves the File Modification date & time unchanged.  As a result, my newly-commented image files do not get backed up or updated between my laptop and desktop.  Of course, I can choose the option to "Set to current date and time" but this choice is not permanent, and is forgotten when the current Thumbs Plus session is terminated, so the problem recurs when I next start Thumbs Plus.



It would seem to me that the default should be to always set the file modification date and time to the current date and time, for any changes to the content of a file, even if just to add or replace the comments.  Indeed, this is the expected operating system default, and for Thumbs Plus to override it without my intentionally requesting such override simply invites disaster.

Today I had to go through a few thousand pictures by hand to identify which ones I had commented, and then explicitly change their modification times, in order to get them to properly get backed up as should have happened automatically.

This troublesome behavior has been noted in TP 7.0-sp2 and in version 9.0.

     - Rich

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 933
    • View Profile
File date not changed when file modified
« Reply #1 on: 2013-05-31 18:45:06 »
> I frequently use the Thumbs Plus "Modify File Info" command (Ctrl-Shift-Q) to add comments (captions) to my JPEG photographs.  Unfortunately by default this command preserves the File Modification date & time unchanged.

Most users like to preserve the original timestamp that their camera assigned to the file because it allows them to view the files in chronological order. Photos are different from other files in that respect.

> Today I had to go through a few thousand pictures by hand to identify which ones I had commented

If it should happen again: Turn on the setting that copies image comments into database annotations, re-thumbnail the files, and sort them on annotation (for this, annotations must be made visible in the thumbnail view) to figure out more quickly which files have a comment.

> [..] and then explicitly change their modification times, in order to get them to properly get backed up as should have happened automatically.

Well, ThumbsPlus does offer you the option of updating the timestamp -you just have to remember using it- and it does properly update a file's archive bit when it modifies it (regardless of whether the timestamp is updated), so that should accomodate most backup strategies.

BTW, the Modify File Info dialog that you used deals with oldfashioned image comments from before IPTC and EXIF were introduced:

    [*] GIF: Version 89a comment field
    [*] JPEG: COM marker field(s)
    [*] TIFF: Description tag
    [*] PNG: Text fields
    [/list]

    I haven't tried, but I'm not sure if TP also fills the relevant IPTC (caption) and EXIF (user comment) fields, which other programs or other uses of the images may require. If that's an issue, it may be better to edit one of those fields instead, and use the relevant settings in Options | Prefs | Metadata to automatically copy the new contents into the comment field too.
    I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

    Rich Pasco

    • Member
    • **
    • Posts: 12
      • View Profile
    File date not changed when file modified
    « Reply #2 on: 2013-06-01 03:08:16 »
    Daan, thank you for taking the time to reply.

    > Most users like to preserve the original timestamp that their camera assigned to the file because it allows them to view the files in chronological order.

    In that case, I am not "Most users".

    My camera, like most, assigns file names to the images, so a filename sort places them in the order taken, and I have no problem viewing them in the order taken regardless of the file modification date.

    If I really want to get fancy, I user an external utility to rename the files according to their EXIF dates.

    But again, any modification to any file should set the file modification date accordingly, in order for my file synch and backup to work.  I understand that some users (I disagree with you, not "most users") might not want this behavior, but breaking the OS should not be the default.

    > If it should happen again: Turn on the setting that copies image comments into database annotations, re-thumbnail the files, and sort them on annotation (for this, annotations must be made visible in the thumbnail view) to figure out more quickly which files have a comment.

    Two problems with this approach:
    (1) These commented files were spread across dozens of folders, not all in one.
    (2) It destroys the file names the camera had assigned.

    > Well, ThumbsPlus does offer you the option of updating the timestamp -you just have to remember using it-

    I appreciate that the option "Set to current date/time" is soomewhat sticky: once applied, it remains in effect when commenting other photos during the same session.  Unfortunately it is cleared when I quit and later restart Thumbs Plus.  Is there any chance of making it's stickiness be durable across a quit and restart?

    > and it does properly update a file's archive bit when it modifies it (regardless of whether the timestamp is updated), so that should accomodate most backup strategies.

    I synchronize my laptop and desktop via file modification dates via a batch script that uses:

      xcopy source target /D

    I can't imagine how to safely use the archive bit for this without interfering with a backup system which also used the archive bit.

    > BTW, the Modify File Info dialog that you used deals with oldfashioned image comments from before IPTC and EXIF were introduced:

    These comments work better for me because they are preserved across format changes (to TIFF, PNG, etc) even if I check the box to remove EXIF tags.  Also they are displayed in a slide show if I select Options / Viewing / Slide Show / Show: File Comments.

         - Rich

    Daan van Rooijen

    • Administrator
    • Sr. Member
    • *****
    • Posts: 933
      • View Profile
    File date not changed when file modified
    « Reply #3 on: 2013-06-01 03:44:12 »
    Hi Rich,

    > > If it should happen again: Turn on the setting that copies image comments into database annotations, re-thumbnail the files, and sort them on annotation (for this, annotations must be made visible in the thumbnail view) to figure out more quickly which files have a comment.
    >
    > Two problems with this approach:
    > (1) These commented files were spread across dozens of folders, not all in one.

    Well, instead of sorting you could also perform a search (tn.[annotation] > '') to find the images that have annotations. Or, if they are subfolders of the same parent folder, use "show child folders" and sort them.

    > (2) It destroys the file names the camera had assigned.

    It shouldn't affect the filenames at all.

    > Is there any chance of making it's stickiness be durable across a quit and restart?

    I can't answer that, but I doubt it.
     
    > I synchronize my laptop and desktop via file modification dates via a batch script that uses:
    >
    >   xcopy source target /D
    >
    > I can't imagine how to safely use the archive bit for this without interfering with a backup system which also used the archive bit.

    I believe that's what XCOPY /A is for. It reads the archive bit to see which files need backing up, but doesn't reset it, so that another program can use the archive bit too.

    Best,

    -Daan-
    I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

    Rich Pasco

    • Member
    • **
    • Posts: 12
      • View Profile
    File date not changed when file modified
    « Reply #4 on: 2013-06-01 09:45:47 »
    > It shouldn't affect the filenames at all.

    On re-reading your suggestion, I see you're right.  I had misunderstood the first time through.

    > I believe that's what XCOPY /A is for. It reads the archive bit to see which files need backing up, but doesn't reset it, so that another program can use the archive bit too.

    And of course that would work only the archive bit indicated which files had modified comments since the last XCOPY, which would require that the last XCOPY had had cleared it.

    Daan van Rooijen

    • Administrator
    • Sr. Member
    • *****
    • Posts: 933
      • View Profile
    File date not changed when file modified
    « Reply #5 on: 2013-06-01 15:25:34 »
    > > I believe that's what XCOPY /A is for. It reads the archive bit to see which files need backing up, but doesn't reset it, so that another program can use the archive bit too.
    >
    > And of course that would work only the archive bit indicated which files had modified comments since the last XCOPY, which would require that the last XCOPY had had cleared it.

    No. You would sync your files between PC and notebook using XCOPY, which would leave the archive bits alone, and then run the backup software, which would reset them.
    I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

    Rich Pasco

    • Member
    • **
    • Posts: 12
      • View Profile
    File date not changed when file modified
    « Reply #6 on: 2013-06-02 10:33:39 »
    > No. You would sync your files between PC and notebook using XCOPY, which would leave the archive bits alone, and then run the backup software, which would reset them.

    With what XCOPY options?

    Presently, I use the /d (date) option, which copies newer files, to sync the laptop.  That does exactly what I want except in the case where Thumbs Plus fails to change the modified date when it modifies file comments.

    If I switched to /a (archive bit), then every laptop sync would copy the same files over and over again until my next backup.

    I infer that you are presuming to expect a notebook sync and then a backup in that order.

    Daan, while I get your intention to be helpful, I am troubled that what started out as my requesting a simple change of the default behavior of Thumbs Plus to comply with expected operating system behavior (any change to the content of a file changes its OS modification date) resulted in your taking on telling me to change the way my laptop synchronization and backup scripts operate.  And you still have not answered my original question, which was how to make "Set to current date/time" be my default each time I start Thumbs Plus.

    Daan van Rooijen

    • Administrator
    • Sr. Member
    • *****
    • Posts: 933
      • View Profile
    File date not changed when file modified
    « Reply #7 on: 2013-06-02 21:31:30 »
    > .. I am troubled that [..] resulted in your taking on telling me to change the way my laptop synchronization and backup scripts operate.

    Nonsense! I simply responded to your comment:

    > I can't imagine how to safely use the archive bit for this without interfering with a backup system which also used the archive bit.

    If you had no use for my factually correct answer to begin with, maybe you shouldn't have brought it up..

     > And you still have not answered my original question, which was how to make "Set to current date/time" be my default each time I start Thumbs Plus.

    There is no such option that I know of and I have explained why the default is not to change the timestamp. If you still think that's wrong, you'll have to take that up with Phillip.

    For now, the only alternative method that I can think of to enter comments AND update the timestamp in v9 is to set the "Copy Description/Caption to image comment" option in Opt | Pref | Meta as discussed earlier, and then to enter your comments through the Metadata | Description | Comments field in the Metadata panel. However, if the files already have any comments, the autocopy function will not replace those but instead append your new comment to them.
    I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

    Rich Pasco

    • Member
    • **
    • Posts: 12
      • View Profile
    File date not changed when file modified
    « Reply #8 on: 2013-06-08 00:03:02 »
    > There is no such option that I know of and I have explained why the default is not to change the timestamp. If you still think that's wrong, you'll have to take that up with Phillip.

    I would like to do that.  I had hoped that this Forum would be a way to report such a problem to his attention, but I guess not.  I'll e-mail him privately.

    Daan van Rooijen

    • Administrator
    • Sr. Member
    • *****
    • Posts: 933
      • View Profile
    File date not changed when file modified
    « Reply #9 on: 2013-06-08 00:22:58 »
    > I would like to do that.  I had hoped that this Forum would be a way to report such a problem to his attention, but I guess not.

    No, [link=http://forums.cerious.com/forum/index.php?mode=user&show_user=1]Phillip's[/link] last visit here was in January and his last message dates back to May 2011.. I wish it were different. Back in the newsgroup days he often had interesting information to share and betatest discussions were very productive.
    I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

    laser2sail

    • Full Member
    • ***
    • Posts: 28
      • View Profile
    File date not changed when file modified
    « Reply #10 on: 2013-06-12 07:55:27 »
    As you say, every user is different.

    After too many instances of wanting to revert to the original image, I went all OCD. Instead of leaving camera pictures at \my pictures\\, I created a script to do the following:
    1) a backup original is saved as e:\camera\\\\
    2) a copy to edit is created as e:\pictures\a\\
    3) both new files are verified before removing the original under \my pictures.

    A benefit in saving the original elsewhere is if the original is still in \my pictures, I'll know I haven't made copies yet.

    If I edit or rename , I assign a keyword to the original to indicate there's an edited or renamed version so I won't delete.

    Rich Pasco

    • Member
    • **
    • Posts: 12
      • View Profile
    File date not changed when file modified
    « Reply #11 on: 2013-06-12 08:05:56 »
    That's interesting, laser2sail, but it does not address the subject of this thread.

    laser2sail

    • Full Member
    • ***
    • Posts: 28
      • View Profile
    File date not changed when file modified
    « Reply #12 on: 2013-06-12 08:14:19 »
    I don't worry about saving the original date on an edited picture, I can follow back to the original.

    Rich Pasco

    • Member
    • **
    • Posts: 12
      • View Profile
    File date not changed when file modified
    « Reply #13 on: 2013-06-22 23:32:45 »
    I contacted Laura Shook with this issue, who replied,

    "You are absolutely correct.  I just left Phillip in his office fixing this troublesome code."

    So, I would expect the default to be changed as I requested in some future version of Thumbs Plus.

    Daan van Rooijen

    • Administrator
    • Sr. Member
    • *****
    • Posts: 933
      • View Profile
    File date not changed when file modified
    « Reply #14 on: 2013-06-23 07:26:04 »
    Good for you. A still better solution, I think, would be to make the default value dependent on the setting for "Retain original file date/time when quick process turning or editing IPTC".
    I'm volunteering as a moderator - I do not work for Cerious Software, Inc.