<UTIL>Redate whole dir-trees folders to youngest file

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Stefan2, white, sheep, Hacker

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-07-07, 21:13 UTC

I get "Failed to get last write time", and then another alert "Plugin - Write error!" And this is repeatable.
Digging it down, applying the plugin to each subdirectory, I found the error happens for what seems a very long name:

directory:
"e:\p2p\filmvisti\Valerian.and.the.City.of.a.Thousand.Planets.-.Valerian.e.la.città.dei.mille.pianeti.(2017).French.English-language.3D.science.fiction.adventure.Luc.Besson\" <DIR> 05/01/2018 11:21 -a--

with only this file:
"e:\p2p\filmvisti\Valerian.and.the.City.of.a.Thousand.Planets.-.Valerian.e.la.città.dei.mille.pianeti.(2017).French.English-language.3D.science.fiction.adventure.Luc.Besson\valerian.e.la.citta.dei.mille.pianeti.2017.bdrip.1080p.x264.dts.ita.ac3.eng.subs.lele753.mkv" 9,928,000,082 05/01/2018 11:21 -a--

User avatar
tbeu
Power Member
Power Member
Posts: 1254
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *tbeu » 2019-07-08, 09:14 UTC

Thanks for reporting. Should be fixed by SetFolderDate 1.0.0.4. Since totalcmd.net is currently not available you can get it from here.
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-07-08, 15:27 UTC

tbeu wrote:
2019-07-08, 09:14 UTC
Thanks for reporting. Should be fixed by SetFolderDate 1.0.0.4. Since totalcmd.net is currently not available you can get it from here.
It's still giving the same error, tried running TC as admin, 32 and 64 bit same result.

User avatar
tbeu
Power Member
Power Member
Posts: 1254
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *tbeu » 2019-07-08, 17:00 UTC

Very strange. Can reproduce in the Release configuration, but not in the Debug configuration. Need to analyze...
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-07-09, 11:24 UTC

The redate works ok if I rename the directory to something short. If I set it back to:
"Valerian.and.the.City.of.a.Thousand.Planets.-.Valerian.e.la.città.dei.mille.pianeti.(2017).French.English-language.3D.science.fiction.adventure.Luc.Besson"
then I get the error alerts, and I also found with openedfilesview that TC keeps the directory locked.

User avatar
tbeu
Power Member
Power Member
Posts: 1254
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *tbeu » 2019-07-12, 12:43 UTC

Both issues should be fixed by updated version SetFolderDate 1.0.0.5.
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-07-12, 20:43 UTC

tbeu wrote:
2019-07-12, 12:43 UTC
Both issues should be fixed by updated version SetFolderDate 1.0.0.5.
It's working good on the same dir structure now, thanks, more testing coming =)

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-07-14, 06:37 UTC

Did some more testing, let's talk about empty directories, what should we do with them? At the moment their timestamp stays untouched when it is the newest in the parent tree and this becomes the timestamp for all. Well in most case I would like to set the timestamp only to the most recent actual file in the tree, not directory. For me this would work always, don't know if it should be optional behavior as I see other tools let you choose what to do with empty dirs.

User avatar
tbeu
Power Member
Power Member
Posts: 1254
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *tbeu » 2019-07-19, 16:08 UTC

Should be configurable by SetFolderDate 1.1.0.0.
Last edited by tbeu on 2019-07-20, 07:05 UTC, edited 2 times in total.
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-07-19, 20:29 UTC

tbeu wrote:
2019-07-19, 16:08 UTC
Should be configurable by SetFolderData 1.1.0.0.
SetFolderDate 1.1.0.0
fix =)

http://totalcmd.net/plugring/setfolderdate64.html

thank you

User avatar
versalzen
Power Member
Power Member
Posts: 643
Joined: 2003-09-16, 11:52 UTC
Location: kölle, linksrheinisch.

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *versalzen » 2019-08-20, 01:27 UTC

Hey,

It seems, the dates written to directories are takes from their sub-directories too, not only from the files inside those directories.
eitang wrote:
2012-12-16, 19:53 UTC
Each directory will be timestamped to the same time and date of the youngest file inside it.
The quoted description does not mention that specificly.

Also, the current readme of the plugin mentiones only files.
Readme.txt wrote:SetFolderDate is a utility packer plugin for Total Commander to recursively set
the timestamp of directory structures from the last modified/write time of the
youngest file inside.
Can we have a switch to only consider files as sources for dates?

I've tested the Plugin with the root of the folderstructure from this plugin.
After executing, the folder \fonts\ in \GraphicConverter\rsvg\etc\ is dated 28.02.16, but the file fonts.conf inside \fonts\ is dated 30.12.17

Tested with both options youngest/oldest and not entirely sure, weather this is by intention or a bug or something else...
Was nützt der Löffel für die Weisheit, wenn man zu weit vom Suppentopf entfernt sitzt?

Mario

mikedepetris
Junior Member
Junior Member
Posts: 46
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: <UTIL>Redate whole dir-trees folders to youngest file

Post by *mikedepetris » 2019-08-20, 11:30 UTC

mikedepetris wrote:
2019-07-14, 06:37 UTC
Did some more testing, let's talk about empty directories, what should we do with them? At the moment their timestamp stays untouched when it is the newest in the parent tree and this becomes the timestamp for all. Well in most case I would like to set the timestamp only to the most recent actual file in the tree, not directory. For me this would work always, don't know if it should be optional behavior as I see other tools let you choose what to do with empty dirs.
I still would like to have an option to set all empty folders dates to the joungest file in the containing folder, unless the timestamp is already older.

Post Reply