--exclude-if-present possible for multiple files?

What is the problem you are having with rclone?

Is it possible to use --exclude-if-present for multiple files? Since this flag only accepted once in a command, I couldn't figure out if this is possible. The command below will outright ignore those listed files and sync them regardless.

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

1.58.1

Yes

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

Onedrive

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

rclone sync --exclude-if-present "{.ignore, .ignore2, .ignore3}" remote: src

The rclone config contents with secrets removed.

Not relevant

A log from the command with the -vv flag

Not relevant

Not currently, no.

It would be relatively easy to allow it to be repeated on the command line

--exclude-if-present .ignore --exclude-if-present .ignore2 --exclude-if-present .ignore3

Alternatively it could be some kind of Glob so

--exclude-if-present ".ignore*"

Wait, I thought the first one is not acceptable since it's mentioned in the doc that

--exclude-if-present can only be used once in an rclone command

unless the doc is outdated?

You can't do it now. I was just saying it would be relatively easy to add. If you wanted to have a go I could give instructions.

Ahh I see, my bad. I was excited for a moment haha.

If you wanted to have a go I could give instructions.

By instructions you meant modified rclone source code by myself? Not sure I'm capable enough to do that though. Would you consider adding this in rclone in the future update? This is very useful since all other filter already allowed multiple instances, except this one.

If you make an issue on GitHub I'll see if we can find a taker for it.

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