Why does the file creation date remain the same when copying and pasting a file?
When copying a file from flash drive to macOS file system, the file creation date remains the same as the original file.
If it is on Windows, the file creation date of a new file when copying a file and pasting it will not be same as the original file, but will have the current date time instead.
Why is the behavior different between OS? Is this due to the different specification in NTFS and HFS file system?
This is because the GUI copy function on macOS preserves all attributes by default.
To put it in command line terms:
When you copy and paste a file in macOS, by default its doing this:
cp -a /source/file1 /destination/
which preserves attributes such as permissions and timestamps.
The only workaround for this (i.e., to achieve Windows-like behavior) is to copy files using the command line. Applications -> Terminal.app
and use the following command:
cp -r /source/file1 /destination
Alternatively, you can simplify the process by allowing terminal to get file paths by simply dragging and dropping the source file and the destination folder:
- Search
- Type "Terminal". Press return
- Type
cp -r
- Drag and drop the source file
- Drag and drop the destination file
- Press return again.
I just found the answer in this Mac Help post by Gregory Pratt:
The Windows philosophy toward creation times is filesystem-centric; the timestamp reflects the time when the file entry was created on that volume. For this reason, when you copy the file to a different volume, the copy gets a new creation timestamp -- one that might even be newer than the file modification time.
The Mac philosophy toward creation times is document-oriented; the timestamp indicates when the document (the contents of the file) was first saved.