Couple rclone check to rclone delete to selectively delete files that do not match

What is the problem you are having with rclone?

It's not strictly a problem but I'm wondering how best to accomplish the following task:

Check which files match on the source and destination (via rclone check), and selectively delete all files that do not match and/or which are no longer found on the source. Files exist on the destination from rclone copy.

This, of course, mimics the core concept of rclone sync - but this is something I'd like to run in frequently while preventing any modification of source.

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

rclone v1.65.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 6.2.0-37-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none

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

Dropbox (Business)

The command you were trying to run

rclone check --one-way /path/to/local drive:dir --match matched-files.txt

I'm simply unsure what to do with matched-files.txt. As far as I can see, rclone delete does not accept a list of files.

Please run 'rclone config redacted' and share the full output.

type = dropbox
client_id = XXX
client_secret = XXX
token = XXX
### Double check the config for sensitive info before posting publicly

welcome to the forum,

Read list of source-file names
--files-from stringArray Read list of source-file names from file

sync does not modify the source.

Looks like I have more reading to do to fully understand Rclone... thank you for the reply. Much appreciated.

--dry-run -vv

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