Author Topic: Change Windows File Dates  (Read 2643 times)

PaulS

  • Full Member
  • **
  • Posts: 145
Change Windows File Dates
« on: May 10, 2014, 05:08:35 PM »
In IMatch 3 there was a database method SetFileDateTime that allowed a script to set the Windows created date and modified date for a file.  I haven't been able to find a similar method in IMatch 5.  The Windows Scripting FileSystemObject seems to allow read-only access to the dates.

Does anyone have any suggestions regarding how to do this in the IMatch 5 scripting environment?  Presently I do this outside of IMatch with another utility, but I would like to be able to set these dates based on a file's EXIF original date time within IMatch.

Thanks.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 29382
Re: Change Windows File Dates
« Reply #1 on: May 10, 2014, 06:28:58 PM »
I saw no need for adding this to IMatch 5.
For the very rare occasions these file system time stamps must be changed, it can be done via the ExifTool Command Processor, e.g.  by running

-FileCreateDate<DateTimeOriginal
-FileModifyDate<DateTimeOriginal
{Files}


(From the top of my head, not tested). Google for ExifTool "file system" date for more samples.

Please consider consequences for the file system, Microsoft indexing services, backup and imaging software before changing the created or last modified file system data.
« Last Edit: May 11, 2014, 07:53:48 AM by Mario »

PaulS

  • Full Member
  • **
  • Posts: 145
Re: Change Windows File Dates
« Reply #2 on: May 10, 2014, 11:51:44 PM »
Thanks Mario.  Works as advertised.