I'm having trouble copying files to a new folder on a different drive. When I do this, the "date created" gets updated to the day I copied the file instead of keeping the original creation date. This creates a lot of organizational issues for me. Is there a way to copy files while keeping their original creation dates intact? I'm using the Plasma desktop environment, which might be relevant. Thanks!
4 Answers
Copying files while keeping their original timestamps can definitely be tricky. One technique that works is moving the files instead of copying them, as that generally preserves timestamps. You could also consider renaming the files to include their creation date in the filename to keep track of it when you make a new copy. If you use a bulk renaming tool like KRename on KDE, it might help.
When it comes to Linux, preserving the exact creation date while copying files isn't straightforward. The creation timestamp, which is known as crtime, isn't easily settable. If you really need to keep timestamps, you can use the `cp` command with the `-p` flag. For example: `cp -p source_file target_file`. This keeps some properties but not the creation date. Another way is to zip the files before copying, which retains the original metadata. Then unzip them in the new location. The KDE file manager has built-in buttons for this, so that might be a good option!
You won't get the original creation date back if you copy and paste, as it applies the creation time of the new copy. One method to consider is creating a text document that lists the original timestamps of the files beforehand, so you have a reference later. This involves some effort, but it could be useful for keeping track. Good luck!
You can totally use `rsync` for this! It's designed to clone files and directories while preserving timestamps and other attributes. Just check out the command line options with `rsync --help` for all the flags you can use to keep file metadata. It's a powerful tool for these kinds of tasks!

Just a heads up, it might be a good idea to clarify whether you're concerned about the creation date or the last modified date, as they can often get mixed up.