directory dates are not kept when overwriting dirs

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
mp1
Junior Member
Junior Member
Posts: 2
Joined: 2008-03-18, 16:17 UTC

directory dates are not kept when overwriting dirs

Post by *mp1 »

[TC 7.02a]: When I overwrite a directory (with all it's files) with a dir of the same name but different creation date/time, these attributes are not kept (I have the option "Copy date/time of directories" enabled).
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Where does TC promise to copy the creation date?
Help wrote:Copy date/time of directories
Allows to copy the 'last modified' timestamp of a directory. Warning: On Windows 2000/XP the time stamp of a directory may change when files are changed in that directory!
Copying the creation date was requested before, but I only found a german thread including the author's comment.
Translated:
ghisler(Author) wrote:No file manager I know copies the Created and Last modified-values! Why? These values have the following meaning:
- Created: At this date the file was newly created. For copied files this is the time when the copy was created.
[...]
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

You might be right concerning creationdate, but TC doesn't update the writedate either (and I think that is what mp1 meant in his/her report):

If you have selected "Copy date/time of directories" and copy a directory to a new place for the first time, then the (write)date of the directory on the source side is applied to the new directory on the target side - as expected.

If you later on copy a directory with the same name but a different (write)date to the same target as before, the date of the target directory is kept in stead of being changed to that of the source directory - that's not what I would expect.


If I copy a FILE over another file I'd surely expect the new target file to get the date of the source file - so why the difference for directories?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

petermad wrote:TC doesn't update the writedate either
Yes, but I'm not shure what's wrong with this, because:
petermad wrote:so why the difference for directories?
Overwriting a file replaces all of its old contents with new content, this is different with dirs.
Copying a dir over another existing dir does not really "overwrite" the dir, but only adds/copies contents into it -
like adding files to an archive instead of replacing the whole archive.

On NTFS volumes: If the target directory already exists, its modified date gets constantly adjusted to the date its contents are changed -
I'd consider adopting an older date (until the next content change) while copying to be rather irritating.

On FAT volumes (I think) the modified date of dirs normally equals the creation date (unless changed manually or by a tool) and is not automatically changed by the FS,
so here it may be seen in a different light.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
mp1
Junior Member
Junior Member
Posts: 2
Joined: 2008-03-18, 16:17 UTC

Post by *mp1 »

If you later on copy a directory with the same name but a different (write)date to the same target as before, the date of the target directory is kept in stead of being changed to that of the source directory - that's not what I would expect.
That's exactly my problem. I want to be able to keep the modification date of the source because that's the one beeing used for compares/syncs.

And btw. Midnight Commander implements this behaviour under linux if you select "keep attributes" for a copy operation.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

So maybe we need an additional option
"Overwrite date/time of directories on copying"
?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

so here it may be seen in a different light.
That's one of the reasons why I stick to FAT on most of my partitions.
So maybe we need an additional option
I don't think so - I just think the current option "Copy date/time of directories" should work as requested here.

For FAT-partions it makes sense, and for NTFS-partitions it doesn't matter since the date is going to be changed anyway by the OS the next time a change happens inside the dir - a very annoying behaviour IMHO!
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's indeed a problem (or Microsoft would call it feature) of the NTFS file system. If anyone knows how to stop that, please let us know!
Author of Total Commander
https://www.ghisler.com
stormy1777
Junior Member
Junior Member
Posts: 5
Joined: 2008-01-31, 07:54 UTC

Post by *stormy1777 »

This is a very HUGE limitation of Total commander... and really it's very easy to fix. Any program can modify the date of ANY file.. Yes, it's true that a new file is created, but when you finish copying the last file in that directory you reset the directory's date, very simple.. there's an API in windows to do that.. If you don't believe, just try xxcopy:

http://www.xxcopy.com/index.htm#toc

it's free, then issue:

xxcopy c: d: /s /tca

and you are done, all the directories will be copied with correct timestamp as the original...

hope that TC can fix this... despite the folder location of this message.

Thanks.
Post Reply