What is the problem you are having with rclone?
How can i exclude Multiple Dreictories in Rclone
Run the command 'rclone version' and share the full output of the command.
rclone v1.71.0
os/version: debian 12.11 (64 bit)
os/kernel: 5.10.224-antix.1-amd64-smp (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.25.0
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 sync "/media/Master_Drive/" "gdrive:Computer Storage Backup/Master Drive" --exclude "/$RECYCLE.BIN/" --exclude "/(Useless Files)/**" -P --delete-excludedPaste command here
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =
Double check the config for sensitive info before posting publicly
[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =
### Double check the config for sensitive info before posting publicly
A log from the command that you were trying to run with the -vv
flag
Paste log here
And what does not work? Maybe provide some example.
rclone sync \
"/media/Master_Drive/" \
"gdrive:Computer Storage Backup/Master Drive" \
--exclude "/$RECYCLE.BIN/**" \
--exclude "**/(Useless Files)/**" \
-P --delete-excluded
this doesn’t work
Use rclone ls
or rclone tree
for testing
For special characters like $
consult your shell documentation whether they have to be escaped and how. It is not really rclone problem. It does what is told by your shell. And sometimes it might be not what you think.
In my case for bash:
$ rclone tree .
/
├── $RECYCLE.BIN
│ └── recycle.bin.file
├── (Useless Files)
│ └── usless_file1.file
├── test
│ └── test.file
└── test1
├── (Useless Files)
│ └── usless_file1.file
├── test1.file
└── test1a
└── test1a.file
6 directories, 6 files
$ rclone tree . --exclude "/\$RECYCLE.BIN/**" --exclude "(Useless Files)/**"
/
├── test
│ └── test.file
└── test1
├── test1.file
└── test1a
└── test1a.file
3 directories, 3 files
If things do not work please post something similar. Your source structure and then structure after applying exclusions.
In general you are doing the right thing but probably messing up some details.
PS.
Sometimes it is easier to use single quotes. In many shells they disable any shell magic and just treat a quoted string literally:
$ rclone tree . --exclude '/$RECYCLE.BIN/**' --exclude '(Useless Files)/**'
/
├── test
│ └── test.file
└── test1
├── test1.file
└── test1a
└── test1a.file
system
(system)
Closed
August 31, 2025, 1:41pm
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.