RC1Bug: Move Dirs with option "Copy Date/time o directo

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jensp
Junior Member
Junior Member
Posts: 2
Joined: 2006-11-27, 08:06 UTC

RC1Bug: Move Dirs with option "Copy Date/time o directo

Post by *jensp »

Hi,

Reproduce:
a) set the option "Copy Date/Time of directories"
b) move a directory-structure from one drive to another

--> Bug: date/time is only copied for root-directory not for subdirectories deeper in the directory structure.

Jens
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Confirmed (partly), but does only occur:

- on move to a different drive letter (no matter if that is on the same physical disk or not) and
- for all directories containing files and/or subdirs, the actual system date/time is assigned (instead of keeping the original date/time, as set in options)

Also applies to directories directly moved from root, not only their subdirs.

For empty directories their date/time is kept correct (unchanged).
The copy-function seems to be completely OK.

Screenshot

Same behaviour in TC 6.56.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

If a new file is created in a directory, Windows does change the date/time of this directory.
So while files are copied into the newly created dirs Windows automatically changes the dir. With empty dirs this clearly doesn't happen.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

If a new file is created in a directory, Windows does change the date/time of this directory.
Sounds logical. Perhaps the move function could (after copying the files) get the date/time information from the old directory before deleting it?
I guess the well-working copy-function does this the same way then?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC already sets the directory time AFTER copying/moving all files in it. Unfortunately the disk cache can write the data long after Windows has reported successful copying, so Windows can re-set the date to the current date AFTER Total Commander has set the directory date.

Time line:
1. TC creates the directory
2. TC tells windows to copy/move the files to it
3. TC sets the directory time
4. Windows finishes copying the data and resets the directory time

I don't see any solution for this problem.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Hm, I wonder why the copy function works better then.
Is your code using the same function for moving as for copying (and deletes the files afterwards)?
If you use different functions: Maybe the windows caching works in different ways for the used copy function and the move function?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, when moving between two disks, the functions are the same.

When moving within a disk, it's the same as renaming in place, so no file is really copied. I do not get a changed directory date in this case...
Author of Total Commander
https://www.ghisler.com
IsoNick
Junior Member
Junior Member
Posts: 22
Joined: 2005-01-18, 22:39 UTC

Post by *IsoNick »

I was about to create a bug report when I stumbled over this thread. Thanks for the answers. In the future I will just copy all my files, and then delete the source manually afterwards. I'm using 7.04a.
IsoNick \\
Reach out and touch someone
Post Reply