mirror of https://github.com/rclone/rclone.git
docs for --exclude-if-present
This commit is contained in:
parent
7d3abdc463
commit
429bb7e8b8
|
@ -421,3 +421,24 @@ In Windows the expansion is done by the command not the shell so this
|
||||||
should work fine
|
should work fine
|
||||||
|
|
||||||
* `--include *.jpg`
|
* `--include *.jpg`
|
||||||
|
|
||||||
|
## Exclude directory based on a file ##
|
||||||
|
|
||||||
|
It is possible to exclude a directory based on a file, which is
|
||||||
|
present in this directory. Filename should be specified using the
|
||||||
|
`--exclude-if-present` flag. This flag has a priority over the other
|
||||||
|
filtering flags.
|
||||||
|
|
||||||
|
Imagine, you have the following directory structure:
|
||||||
|
|
||||||
|
dir1/file1
|
||||||
|
dir1/dir2/file2
|
||||||
|
dir1/dir2/dir3/file3
|
||||||
|
dir1/dir2/dir3/.ignore
|
||||||
|
|
||||||
|
You can exclude `dir3` from sync by running the following command:
|
||||||
|
|
||||||
|
rclone sync --exclude-if-present .ignore dir1 remote:backup
|
||||||
|
|
||||||
|
Currently only one filename is supported, i.e. `--exclude-if-present`
|
||||||
|
should not be used multiple times.
|
||||||
|
|
Loading…
Reference in New Issue