How to exclude specified files in Windows?

I want to perform exclusions in Windows CMD to exclude some files with full paths, but the results cannot meet expectations.

My source directory:

The test command I used:
rclone ls . --exclude "%USERPROFILE%\Downloads\testRclone\png\2.png"

Test results (2.png is not excluded):
2533 png/1.png
2525 png/2.png
2479 png/3.png

How to set up using full path when excluding files or directories in Windows?

welcome to the forum,

that is not possible.
using filters such as --exclude, the path is always relative to the remote/directory.
in your case relative to the current working directory

would be help if you run the command with -vv for debug output.
and we can share the exact command you need.
"Not using paths relative to the root of the remote"


This is indeed the case. I tested and found that --exclude is always relative to the source directory, which is %USERPROFILE%\Downloads\testRclone

If you want to use the full path for exclusion operations, how should you set it up?

This may not be correct, but when I used robocopy before, I had a lot of exclusions set up like this. It might be more convenient to transfer them.

cannot use fullpath for rclone filters.

might try somthing like
rclone ls . --exclude=/png/2.png

i think on windows, this is the closest we can get to fullpath.
rclone ls c:\users\username\Downloads\testRclone --exclude=/png/2.png

also, can use rclone tree to view the directory/file structure.

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