Yes please!
And better, let us allow to define a filter using * and ? multiple times in the same definition. I think it’s time to get rid of the old DOS way of specifying a filter. After all, we have files named with multiple dots now…
And for God’s sake, fix the filtering routine to be case-insensitive !!!
Also, the specifying of folder filters needs an overhaul. I suggest adding a \ at the end to signify that it’s a folder to filter out.
For example, say I have a hierarchy like the following:
+- C:\
| +- UPPERCASE
| | +- BIN
| | | +- file1.exe
| | | +- file2.exe
| | +- FILE1.txt.bak
| | +- FILE1.txt
| | +- OTHER.TXT
| |
| +- lowercase
| | +- bin
| | | +- file1.exe
| | | +- File4.exe
| | +- file1.txt.bak
| | +- file1.txt
| | +- file4.txt
| | +- Other.DOC
| |
| +- MIxeD
| | +- Bin
| | | +- file1.dump
| | +- file4.bak
| |
| +- bin <-- It is a file, not a folder ;)
| +- bin.out
| +- data.txt
For an exclude filter defined as: bin
The backup should not have
- C:\UPPERCASE\BIN\file1.exe
- C:\UPPERCASE\BIN\file2.exe
- C:\lowercase\bin\file1.exe
- C:\lowercase\bin\File4.exe
- C:\MIxeD\Bin\file1.dump
For an exclude filter defined as: bin
The backup should not have
- C:\bin
For an exclude filter defined as: *case
The backup should not have
- C:\UPPERCASE\BIN\file1.exe
- C:\UPPERCASE\BIN\file2.exe
- C:\UPPERCASE\FILE1.txt.bak
- C:\UPPERCASE\FILE1.txt
- C:\UPPERCASE\OTHER.TXT
- C:\lowercase\bin\file1.exe
- C:\lowercase\bin\File4.exe
- C:\lowercase\file1.txt.bak
- C:\lowercase\file1.txt
- C:\lowercase\file4.txt
- C:\lowercase\Other.DOC
For an exclude filter defined as: *.txt
The backup should not have
- C:\UPPERCASE\FILE1.txt
- C:\UPPERCASE\OTHER.TXT
- C:\lowercase\file1.txt
- C:\lowercase\file4.txt
- C:\data.txt
Note that files having the .txt.bak extension are not excluded. To exclude them the filter would need to be .txt.
For an exclude filter defined as: *.txt
The backup should not have
- C:\data.txt
Note that other .txt files are not excluded since the \ in the filter specify from the root of the source.
For an exclude filter defined as: **.txt
The backup should not have
- C:\UPPERCASE\FILE1.txt
- C:\UPPERCASE\OTHER.TXT
- C:\lowercase\file1.txt
- C:\lowercase\file4.txt
Note that C:\data.txt is not filtered out since it is not in a subfolder…
For an exclude filter defined as: ***.txt
The backup should not exclude anything since there are no .txt files in subfolders of the specified depth.
For an exclude filter defined as: case**4
The backup should not have
- C:\lowercase\bin\File4.exe
Note that the . is not really needed as the * includes it in this case. Also note that the filter does not exclude C:\lowercase\file4.txt since it is not in a subfolder as required by the filter.
I think you get the idea.