Is there a delete-before flag for move?

What is the problem you are having with rclone?

Want to delete source files if they exist at destination without transferring files. Script is ending before expected

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

rclone v1.65.0

  • os/version: raspbian 11.8 (64 bit)
  • os/kernel: 6.1.21-v8+ (aarch64)
  • os/type: linux
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.21.4
  • go/linking: static
  • go/tags: none

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

Google Drive

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

rclone move "remote:" "/local/" -P --delete-before --max-transfer=1M

A log from the command that you were trying to run with the -vv flag

2023/12/25 15:28:24 ERROR : Fatal error received - not attempting retries
Transferred:            1 MiB / 498.958 GiB, 0%, 0 B/s, ETA -
Errors:                19 (fatal error encountered)
Checks:                99 / 145, 68%
Deleted:                9 (files), 0 (dirs)
Transferred:            0 / 189, 0%
Elapsed time:         3.9s
2023/12/25 15:28:24 Failed to move with 19 errors: last error was: multi-thread copy: failed to write chunk: max transfer limit reached as set by --max-transfer

And this is exactly how rclone move works. If you have the same file on both source and destination it will be deleted from the source.

Your log file shows some very different problem with your transfers exceeding your own limit - set by --max-transfer. Not sure how it is related to your original question,

Fantastic! What I was wondering was if I could only delete the files in the source, without moving the files that exist in source but not the destination.
I'm trying to set max transfer to not move files that exist in source but not the destination.
I'm trying to use --delete-before to only delete the files in the source that also exist in the destination.

Read about rclone check and it's flag --one-way, --differ, --missing-on-dst, --missing-on-src, --match and --error.

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