Update destination file date

What is the problem you are having with rclone?

Quick question,what command should i use so my remote file will have same modified date as source file?
because somehow onedrive business cant do server side copy with rclone,i manually copy with browser (shared file) so it not perserve original date. i want it same as my original file

Run the command 'rclone version' and share the full output of the command.

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

that is documented at https://rclone.org/docs/#refresh-times

rclone copy file.txt gdrive:zork -vv
DEBUG : file.txt: Modification times differ by 744h0m0s: 1999-01-11 09:53:34 -0500 EST, 1999-02-11 14:53:34 +0000 UTC
DEBUG : file.txt: md5 = 3e539ee52bf22cd04c4f97126edb62d3 OK
INFO  : file.txt: Updated modification time in destination
DEBUG : file.txt: Unchanged skipping
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Checks:                 1 / 1, 100%
Elapsed time:         3.0s
1 Like

it work. 1more question,it possible to do for folder?

No, rclone doesn't maintain folder dates.

1 Like

i dont need use refresh time if i use sync right?only for copy?

not sure what you are asking about?

basically, rclone copy is the same as rclone sync except that rclone copy does not delete files.

and if you are not sure what a command will do, test with --dry-run

im asking if i use sync,it will automatically use refresh time,or im wrong?

by default, "rclone sync"
"Normally if you are doing a modification time sync rclone will update modification times without --refresh-times provided that the remote supports checksums and the checksums match on the file"

but the practical use depends on the storage system.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.