Exclude Directory

Hello everyone,

I would like to copy to teamdrive and exclude any directory named "_ARCHIVES" in the tree.
How can i add this parameter in the " --exclude-from exclude.txt"

Thank you for your help

Dimitri

Shouldn't it just be:

- _ARCHIVES/

I tried a lot of things, but not this one :smiley: i'll try that tomorrow
Thank you :wink:

He gave you the filter-from syntax which is different.

You can use this:

felix@gemini:~/test$ rclone ls /home/felix/test --exclude TEST/
      221 hosts
felix@gemini:~/test$ rclone ls /home/felix/test
      221 hosts
      221 TEST/hosts

or in a file

felix@gemini:~/test$ rclone ls /home/felix/test --exclude-from filter
        6 filter
      221 hosts
felix@gemini:~/test$ cat filter
TEST/

I would do --exclude "_ARCHIVES/**" which excludes _ARCHIVES anywhere in the path and anything under it.

1 Like

@ncw
Should

<some folder name>/**

be used in all cases then (if a directory isn't supposed to be empty)?

Both work, you can be "more" exact with the **

felix@gemini:~/test$ rclone ls /home/felix/test
        6 filter
      221 hosts
      221 TEST/hosts
      227 TEST/2/hosts
felix@gemini:~/test$ rclone ls /home/felix/test --exclude TEST/
        6 filter
      221 hosts
felix@gemini:~/test$ rclone ls /home/felix/test --exclude 'TEST/**'
        6 filter
      221 hosts

Hey , Great thank you for your answers.

I've just tested --exclude "_ARCHIVES/**" and It Worked

it's fine for me

Thank you very much for your help