mirror of
https://github.com/al0cam/AutoMover.git
synced 2026-07-22 05:41:25 +00:00
53 lines
2.3 KiB
Markdown
53 lines
2.3 KiB
Markdown
|
|
# Exclusion Rules
|
||
|
|
|
||
|
|
The exclusion rules are used to exclude files and folders from being moved.
|
||
|
|
They go above the moving rules and are used to filter out files and folders that you don't want to be moved.
|
||
|
|
|
||
|
|
They syntax is the same as the one used for the moving rules but here you can find some exaples of how to use them anyway:
|
||
|
|
|
||
|
|
## Example without Regex
|
||
|
|
|
||
|
|
Lets imagine you have some creatures you want to move into folders like this.
|
||
|
|
The list of creatures looks like this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
And the rules you want to apply to them look like this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
After moving them you are left with this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
And now you are thinking "Damn, despite all that rage, those are still rats in a cage..."
|
||
|
|
And because you saw how angry the rats were, you decided you don't want to include them in further sorting.
|
||
|
|
Therefore, a rule would look like this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
And the result would look like this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
## Example with Regex
|
||
|
|
|
||
|
|
I don't have any funny examples for this one, but I thought it could be useful to have the opportunity to exclude files and folders using regex as well.
|
||
|
|
|
||
|
|
Let's imagine you are moving the following files:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
And you decided you want to exclude those that have numbers as a suffix.
|
||
|
|
Then your rules can look like this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
And the result would look like this:
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
A sidenote for this is that regex can by default be used to manage exclusions as well.
|
||
|
|
So the current example of exclusion could have been handled with a slight change to the moving rule as well.
|
||
|
|
The rule would looks like this "System [^\d\W]*" and the result would be the same.
|