Move skip files with same filenames?

What is the problem you are having with rclone?

Hi there

It seems that with rclone move the source files would overwrite the dest files with same filenames
Is there an option to such that 1) for same files(checked with hash) the source file would be deleted 2) for different files with same filenames, the files are skipped and both files are untouched.

Thanks

I'm confused as what you want to happen.

Move checks the destination and looks for a match based on file size/mod time and if available based on the remote a hash.

If it finds the same, it doesn't recopy and it deletes the source.

felix@gemini:~/test$ rclone move hosts GD: -vv
2021/02/11 06:06:17 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "move" "hosts" "GD:" "-vv"]
2021/02/11 06:06:17 DEBUG : Creating backend with remote "hosts"
2021/02/11 06:06:17 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/02/11 06:06:17 DEBUG : fs cache: adding new entry for parent of "hosts", "/home/felix/test"
2021/02/11 06:06:17 DEBUG : Creating backend with remote "GD:"
2021/02/11 06:06:17 DEBUG : hosts: Size and modification time the same (differ by -22.946µs, within tolerance 1ms)
2021/02/11 06:06:17 DEBUG : hosts: Unchanged skipping
2021/02/11 06:06:17 INFO  : hosts: Deleted
2021/02/11 06:06:17 INFO  :
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                 2 / 2, 100%
Deleted:                1 (files), 0 (dirs)
Elapsed time:         0.4s

2021/02/11 06:06:17 DEBUG : 4 go routines active

If you want to skip a file, you can use an exclude. If you don't want to remove the source, you can copy.

On top of that, track renames provides some additional options:

For example, I have 'a.txt' in destination dir and 'a.txt' in source dir while having different content, how do i prevent rclone overwriting the destination 'a.txt'.

Yes, you can use:

    --ignore-existing                      Skip all files that exist on destination

It works. Thanks.
The destination file was not replaced.
But the source file was deleted, even not being moved.

That's what moves does as it deletes the source file.

If you don't want to delete, you'd use copy.

Yes, I do want to delete the files, except for the skipped files which i want them kept. Is it poss
ible to do so?

You'd have to work on logic to identify skipped files and exclude them from being processed.

Move deletes the source as that what a move command normally does.

1 Like

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