Synchronize Dirs changes folders date/time
Moderators: white, Hacker, petermad, Stefan2
Synchronize Dirs changes folders date/time
When syncing two dirs with subdirs, file maintain their original date/time, but folders do not - they get the current date/time. Is there a way to prevent this behavior so folders will maintain the original date/time?
Re: Synchronize Dirs changes folders date/time
Thats a Windows function.
It updates the folder dates if anything is changed inside.
It updates the folder dates if anything is changed inside.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Synchronize Dirs changes folders date/time
I have been using this button on the button bar for many years.
(copy code, click on empty space on buttonbar and choose "Paste")
You can remove /BYTES /TEE and /NP and change parameter for /R and /W options so button will be look like, e.g. :
P.S. Put cursor on source "UP" directory entry prior to use button.
(copy code, click on empty space on buttonbar and choose "Paste")
Code: Select all
TOTALCMD#BAR#DATA
ROBOCOPY.EXE
%P%N %T%N *. /BYTES /TEE /E /DCOPY:T /NP /R:5 /W:5
%COMMANDER_EXE%,34
-1
Code: Select all
TOTALCMD#BAR#DATA
ROBOCOPY.EXE
%P%N %T%N *. /E /DCOPY:T /R:2 /W:2
%COMMANDER_EXE%,34
-1
P.S. Put cursor on source "UP" directory entry prior to use button.
Re: Synchronize Dirs changes folders date/time
I prefer the tool FolderTimeUpdate from NirSoft.
I let the dirs set to the time stamp of the newest file inside of it.
https://www.nirsoft.net/utils/folder_time_update.html
I let the dirs set to the time stamp of the newest file inside of it.
https://www.nirsoft.net/utils/folder_time_update.html
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Synchronize Dirs changes folders date/time
This is something completely different - note that folders datetimes we want restore may be unrelated to newest file datetime or even any file datetime.
With such a ROBOCOPY button we don't need set any parameters - just press the button - one click. This is also very fast.
With such a ROBOCOPY button we don't need set any parameters - just press the button - one click. This is also very fast.
Re: Synchronize Dirs changes folders date/time
For me a folder time is always related to its contents.Gral wrote: ↑2022-01-01, 17:40 UTC This is something completely different - note that folders datetimes we want restore may be unrelated to newest file datetime or even any file datetime.
With such a ROBOCOPY button we don't need set any parameters - just press the button - one click. This is also very fast.
Different folder time means different content.
A completely unrelated time makes no sense for me.
Thats the reason why Microsoft updates the folder time if the content changes.
Btw. I also click just a button and its happens without any big delay.
Code: Select all
TOTALCMD#BAR#DATA
C:\Tools\NirSoft\x64\FolderTimeUpdate.exe
/BaseFolder %S /scomma c:\temp\FolderTimeUpdate_%N_log.csv
C:\Tools\NirSoft\x64\FolderTimeUpdate.exe
FolderTimeUpdate
-1
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Synchronize Dirs changes folders date/time
Sorry, it's for you, but we probably should consider only solutions desired by OP.
Also note such a example:
You have folder with datetime set to newest file, right?
After hour/day/month you copy or move old file from another folder.
Folder gets current datetime, but there's no files with this datetime, right?
Or just delete newest file, same effect.
So folder datetime is related to ACTION datetime, no file datetime!
This is what Microsoft really do! Still no sense?
Re: Synchronize Dirs changes folders date/time
You are right but thats the reason for me to set it related to the contents.
Having just a fixed date for the folder would not give me any hint about its contents.
Given the folder date of the source tree is set my way
I let just update the target dir after a sync
and it will get the exact same folder dates as the source.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Synchronize Dirs changes folders date/time
Do you search frequently through system folders: Windows, Program Files and so on and set datetimes to newest files on every folder?
Re: Synchronize Dirs changes folders date/time
Of course not, I'm not interested on system folders
I make regular folder time updates for my Pictures und Document folders.
For all the rest folder times are not relevant for me.
I search for folders, files and contents using Everything 1.5 and nothing else.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Synchronize Dirs changes folders date/time
It is related to the NTFS file system. The timestamp will stay untouched on FAT 32 or exFAT formatted disks.
Last edited by petermad on 2022-01-03, 11:15 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Synchronize Dirs changes folders date/time
Horst.Epp and Gral, many thanks! I chose the NirSoft solution, I have "CLIphobia"
Re: Synchronize Dirs changes folders date/time
If you use the NirSoft tool
Before using the button, start the GUI once to set default options.
Most importand is to set
x Update also the base folder
The button example stores the log file in CSV format
as this is easy to read with Lister plugin CSVView for example.
Before using the button, start the GUI once to set default options.
Most importand is to set
x Update also the base folder
The button example stores the log file in CSV format
as this is easy to read with Lister plugin CSVView for example.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Synchronize Dirs changes folders date/time
In TC, you could use
Configuration > Options > Copy/Delete tab > Copy date/time of directories
If you want to edit wincmd.ini directly, the command is [Configuration] > CopyDirTimeStamp=1
Configuration > Options > Copy/Delete tab > Copy date/time of directories
If you want to edit wincmd.ini directly, the command is [Configuration] > CopyDirTimeStamp=1