[TC10.51] Issue: File change date is less than file create date

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

User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Dalai »

AntonDudarenko wrote: 2022-09-11, 16:19 UTCIf you remember for a moment that the date of file creation can not be later than the date of its modification
That's what I was trying to explain above: When copying an existing file to an empty directory, TC copies the file's modification date, but the creation date gets set to the current time. As a result, the creation date is newer than the file's modification date.
andry81 wrote: 2022-09-11, 16:25 UTCWhy? Original file will be colored accordingly its creation date too.
True, but the creation dates of both files are different, despite the files being absolutely identical in every other aspect, content, modification date and so on. That's the point I've been trying to make!
What the `default view "Long"` is?
Sorry, I mean "Full" instead of "Long". I edited my post above.
Why just not add a combobox into `Find Files -> Advanced`:
If you think the existing feature should be extended, go ahead and post a suggestion. I very much doubt the existing behavior is a bug.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: [TC10.51] Issue: File change date is less than file create date

Post by *andry81 »

Dalai wrote: 2022-09-11, 17:26 UTC
andry81 wrote: 2022-09-11, 16:25 UTCWhy? Original file will be colored accordingly its creation date too.
True, but the creation dates of both files are different, despite the files being absolutely identical in every other aspect, content, modification date and so on. That's the point I've been trying to make!
But creation date must be changed. File copying is a file creation. That's the point then?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Horst.Epp »

andry81 wrote: 2022-09-12, 04:04 UTC
Dalai wrote: 2022-09-11, 17:26 UTC
andry81 wrote: 2022-09-11, 16:25 UTCWhy? Original file will be colored accordingly its creation date too.
True, but the creation dates of both files are different, despite the files being absolutely identical in every other aspect, content, modification date and so on. That's the point I've been trying to make!
But creation date must be changed. File copying is a file creation. That's the point then?
No, file copying doesn't create a new content, only a copy of the current one.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Dalai »

The file creation date is the time when a file/directory was created on a specific volume/file-system. Although TC can copy this timestamp as well (CopyAllTimes=1, as I mentioned before), I don't think it would be a good idea to transfer the file creation date by default; the user could lose relevant or important information.

I just wanted to make you sure you're aware of this whole "creation date can be newer than the modification date" thing. And what it means in regards to TC's search which is used to ccolorize files/directories.

And, by the way, it works via the Age plugin, I just tested it.

Code: Select all

age | Created | < | 1 | Days
does exactly what you wanted to achieve with "Not older than 1 days".

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: [TC10.51] Issue: File change date is less than file create date

Post by *andry81 »

Horst.Epp wrote: 2022-09-12, 07:49 UTC No, file copying doesn't create a new content, only a copy of the current one.
Not the content, It does create new instance of content which is the definition of a file. And of cause new instance must has new creation date.
Dalai wrote: 2022-09-12, 13:39 UTC I don't think it would be a good idea to transfer the file creation date by default
It must be controlled by OS of cause.
Dalai wrote: 2022-09-12, 13:39 UTC And, by the way, it works via the Age plugin, I just tested it.

Code: Select all

age | Created | < | 1 | Days

does exactly what you wanted to achieve with "Not older than 1 days".
I did not want that. I've wanted to use the max of 2:
highlight_function(max(create_time, change_time), current_time)
User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Dalai »

andry81 wrote: 2022-09-12, 16:17 UTCI did not want that. I've wanted to use the max of 2:
highlight_function(max(create_time, change_time), current_time)
Well, then specify the search according to your needs. Maybe something like

Code: Select all

[X] Search in plugins    Combine with ( ) AND   (o) OR
age | Created | < | 1 | Days
age | Changed | < | 1 | Days
Or change it to AND. There are a lot of ways the search can be defined, and I'm pretty sure the one you want is among them.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: [TC10.51] Issue: File change date is less than file create date

Post by *andry81 »

Dalai wrote: 2022-09-12, 16:58 UTC Well, then specify the search according to your needs. Maybe something like

Code: Select all

[X] Search in plugins    Combine with ( ) AND   (o) OR
age | Created | < | 1 | Days
age | Changed | < | 1 | Days
Or change it to AND. There are a lot of ways the search can be defined, and I'm pretty sure the one you want is among them.
This will conflict with existing plugins, because they already has color filters (like Extended Menus or something like that).
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC10.51] Issue: File change date is less than file create date

Post by *petermad »

This will conflict with existing plugins, because they already has color filters (like Extended Menus or something like that).
Just give your saved search (with Age) a name that is not already used.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
AntonyD
Power Member
Power Member
Posts: 1217
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC10.51] Issue: File change date is less than file create date

Post by *AntonyD »

That's what I was trying to explain above: When copying an existing file to an empty directory, TC copies the file's modification date, but the creation date gets set to the current time. As a result, the creation date is newer than the file's modification date.
Hmmm, why it was decided to do so??? Can we somehow for sure call Mr.Ghisler here - would it be very useful to get from his hands full explanations - how and why dates are being used/created/modified for files.
#146217 personal license
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Horst.Epp »

AntonDudarenko wrote: 2022-09-13, 08:09 UTC
That's what I was trying to explain above: When copying an existing file to an empty directory, TC copies the file's modification date, but the creation date gets set to the current time. As a result, the creation date is newer than the file's modification date.
Hmmm, why it was decided to do so??? Can we somehow for sure call Mr.Ghisler here - would it be very useful to get from his hands full explanations - how and why dates are being used/created/modified for files.
The reason is simple, Explorer does it exactly this way.
Try it and you know Christians answer in advance.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Hacker »

Isn't it moreof a filesystem question, which date means what? And file managers simply adhere to it (mostly by doing nothing special).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC10.51] Issue: File change date is less than file create date

Post by *Dalai »

It's possible that it just works this way and TC doesn't do anything special in regard to the file modification date when just copying files. However, there are several threads on this forum where users complained that the file modification date wasn't set properly (mostly due to anti-virus software taking a long time to scan a file). One thing I'm pretty sure about: When TC unpacks a file, it sets the modification date. Maybe these threads were about unpacking, altough I doubt that's the case for all of them.

Anyway, I doubt that TC's behavior will be changed after so many years, especially when it comes to the "Not older than" part of TC's search. Changing that from modification date to creation date would break saved searchs all around the world using that search parameter.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.51] Issue: File change date is less than file create date

Post by *ghisler(Author) »

Indeed there are no plans to change this behaviour. Even the Windows Explorer only copies the modification date when copying a file. The meaning of the 3 dates is:
1. Creation date: When was the file added to the file system. When copying, this was when the file was copied. When renaming/moving within the same drive, this was when the file was initially created. When moving to a different drive, this was when the file was moved since a new entry is being created on the other drive.
2. Modification date: That's when the content of the file was changed. This is either when creating a new file, or modifing its content. When copying, no new content is being created, so the modification date stays the same.
3. Access date: When the file was last read from or written to.

The most important one is certainly the modification date, it tells you when actual file content was modified. Rsync seems to keep the modification date too when downloading files. So when you rsync files to your PC and then search for files which are max x days old, you will find files where the content was modified within these x days (by yourself locally, or someone else remotely). You will not find files which were downloaded by rsync within these x days. Both searches have their meanings.
Author of Total Commander
https://www.ghisler.com
Post Reply