Author Topic: Correct Folder date  (Read 50209 times)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4383
    • View Profile
    • Multi Commander
Correct Folder date
« on: July 26, 2012, 14:27:37 »
This is another of the lesser know feature of Multi Commander.

One thing that is a bit annoying with how the file system works in Windows is how the file system changes the date of a folder if a file in that folder is removed/added. If you add (or remove) a file in a folder, then the date of the folder that this files was added to is also changed.

And Sometimes you do not want. Because you are for example sorting the folders by date. and now the sorting is messed up.

For example

Say you got folders with pictures you have taken on different vacations you been on and the date of the folder are matching the date of the files inside the folder. The picture files inside the folders have the date and time of when the picture was taken so the folder have the date and time of the latest picture.
(Btw, The tool 'Adjust EXIF date information' can also set the file date to match the date of the EXIF date from the picture )

So when sorting the picture folder by date you will get the folder in the correct order.

Folder          Date
Sidney        2011-04-16
New York      2010-11-12
Pairs         2009-12-12



But then you remove some of your bad picture from the Paris folder. The problem is that the date of the Paris folder will now change.

Folder          Date
Pairs         2012-07-26
Sidney        2011-04-16
New York      2010-11-12


To correct it you can modify the date you self. But if you have many folders with incorrect date that is a pain.

It is now the "Correct Folder Date/Time" tool that you find under the tools menu in Multi Commander come to use.

This tool will scan the files inside the folder and its subfolder and then change the date/time of the folder and subfolders to the time of the latest date/time of a file inside that folder.
So the folder will now receive the date and time of the latest file in that folder.

You will have the option to exclude files from the scan. For example if you added a text file to you pictures with description and other information about the picture you might not what the scan to include the date of that file into the scan, You then enter "*.txt" in the Ignore field.
Or you could also add *.jpg in the Include Only field.

leopoldus

  • Junior Member
  • **
  • Posts: 16
    • View Profile
Re: Correct Folder date
« Reply #1 on: August 25, 2012, 20:29:42 »
Hi,

The idea to repair this NTFS "feature" to update a folder modification time every time when changes the folder content is fine itself. However it seems, that the latest file modification date does not always suit as the folder time.

Would not you consider alternate approach: let Multi Commander keeps the original date of the folder when it adds, deletes on renames a file or subfolder in this folder. Technically it should mean, that before starting any file operation in a folder, Multi Commander records for itself somewhere the current value of the "modified" attribute and when the operation is finished MC should restore this original value.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4383
    • View Profile
    • Multi Commander
Re: Correct Folder date
« Reply #2 on: August 25, 2012, 21:12:12 »
The idea to repair this NTFS "feature" to update a folder modification time every time when changes the folder content is fine itself. However it seems, that the latest file modification date does not always suit as the folder time.
I use this tool a lot and I have never had it fail on me. But if you can reproduce a case for me I'm happy to look at it.

Would not you consider alternate approach: let Multi Commander keeps the original date of the folder when it adds, deletes on renames a file or subfolder in this folder. Technically it should mean, that before starting any file operation in a folder, Multi Commander records for itself somewhere the current value of the "modified" attribute and when the operation is finished MC should restore this original value.
I think the default behavior of how NTFS is updating the modified time is good. The default behavior should be so that you can track changes to folders, It is only in some situations that you do not want that. And it is in those situations this tool will fix the time stamps for you.