al0cam_AutoMover/docs/exclusion-rules.md

2.3 KiB

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:

ExclusionExample1Before

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

rulesToApplyRats

After moving them you are left with this:

Example1Sorted

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:

ExcludedRat

And the result would look like this:

RatsUntrapped

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:

SystemFiles

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

SystemRules

And the result would look like this:

SystemResult

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.