Page 1 of 1

How to keep the timestamp of a folder when copying it

Posted: 19.12.2022, 08:20
by chain
How to keep the timestamp of a folder when copying it?

Re: How to keep the timestamp of a folder when copying it

Posted: 19.12.2022, 19:47
by Dreamer

Re: How to keep the timestamp of a folder when copying it

Posted: 20.12.2022, 03:22
by chain
Just what I want, thanks very much...

Re: How to keep the timestamp of a folder when copying it

Posted: 29.12.2022, 12:30
by shelby
To keep the timestamp (i.e., the date and time at which a folder was created or last modified) of a folder when copying it, you can use the cp command with the -p option on Unix-like systems such as Linux and macOS.

For example, to copy the folder source_folder to destination_folder, preserving the timestamp, you can use the following command:
code "cp -p source_folder destination_folder"