Today, I discovered a very interesting and strange way to do this without using third party software.
- Copy a file, say
foo.bar
with the creation date of yesterday.
- Paste it in the same folder. As usual, the copied file
foo - Copy.bar
will have the creation date of today.
- Rename the original file
foo.bar
to something else, say foo-.bar
.
- Rename the copied file
foo - Copy.bar
to foo.bar
.
The copied file's creation date will then immediately change to that of the original file, i.e. yesterday. The original file's creation date will of course remain same. After that, you can rename, move, cut-and-paste, etc.; the creation dates of both files will be preserved as the old creation date. You will have successfully duplicated the original file with the same date attributes.
If you wanted to copy the file to a different folder, rather than duplicating a file inside the folder, that can naturally be added as the fifth step by moving the file; but replacing the third step as follows
- Move (cut-and-paste) the original file
foo.bar
to the desired copy location.
with the fourth step unchanged also seem to work.
I have no idea why this works or if it is intended behavior. I initially thought it is because of some software or customization that I have, so I tested it on another computer with little customization and it again worked. I also tried it on a FAT32 USB flash drive, and it again worked, so it is not a quirk of NTFS as I initially suspected.
Still, confirmation from other people about if it works on their systems would be useful. I tested it on Windows 10 20H2 systems. If it indeed works the same for everyone, I would love to see some documentation or explanation for this feature.