The support forum

Understanding the File Filtering Rules

jsarraf :

Aug 15, 2015

Hello There.  New using the system and I do not seem to understand how the filtering work.
+ I have a very large folder tree that have many levels.
+ I organise my files in such a way that my pdf files are always under a folder called PDF.
+ All my power points are under a folder called POWERPOINT.
+ So the structure PDF\*.pdf or POWERPOINT\*.pptx can be found at any branch and level of the folder tree.
+ I want to backup ONLY those files structures PDF/*.pdf and POWERPOINT\*.pptx  but do not seem to be able to do that.
- The file rule PDF\*.pdf and POWERPOINT\*.pptx  seems to copy all PDF and PowerPoint BUT.
- Files which are not PDF or PPTX are also copied (example word documents).
- Some PDF are included even though they are not under my root tree.

Any help can be appreciated. I am not after a solution as much as a little bit of a TUTORIAL on how those filters are designed to work. so that I can user them for different project in the future.  God Bless.

Alex Pankratov :

Aug 16, 2015

Filtering logic varies depending on if the backup is set to include everything by default or if it's set to start with an empty list.

"Include everything" option

If it's set to include everything, then the filtering works as follows. When the app scans source location, it starts by listing all files and folders at the top of it.

For each item - be it a file or a folder - it first goes through the list of *exclude* filters as specified by the middle pane on the configuration dialog. That is, it will look for an exact match on a name, full path and a type of the item (file or folder). If there's a match, the item is excluded and the app simply pretends it doesn't exist. Meaning, that if it's a folder, it's won't be scanned.

If there's no match, then the app proceeds to the custom filters (the bottom pane of the configuration window). Here it matches on name, path and, optionally, on type, attributes, size and timestamps. The first filter that is a match defines the action (include or exclude) and terminates the processing.

If there's no match again, then the item is *included*.

Now, if this is the filtering mode you are using, then you need to override the default from "included" to "excluded" and this is done by adding

       exclude   file   *

rule at the bottom of the filter list.

"Start with an empty list" option

This is a bit more contrived case, but not that much more complicated.

Again, for any item at hand the app first goes through the list of explicit includes as defined by the middle pane of the configuration window. If there's a match then item is included and that's it.

Otherwise it looks through the custom rules and applies the same logic as above - the first matching rule determines the action and terminates the processing.

If there's no match and it's a file, then it is excluded.

If there's no match and it's a folder, then the app checks if there are any custom rules that may potentially match anything in this folder. If there aren't, then the folder is excluded. Otherwise it is included *provisionally*.

For example, if there is "include file *.lib" rule, then all folders will be included provisionally as there's a chance that any of them may contain *.lib files.

Finally, after the scan is done, all provisional folders that didn't end up with explicitly included item are excluded.

Easy-peasy :)


Now, in your case what you need to do is to use "Start with an empty list" option and just add two rules -

         include   file   PDF\*.pdf
         include   file   POWERPOINT\*.pptx

(I realize that this is different from what I suggested to you over email, but I've reviewed the exact filtering logic after our conversation and the above setup is simpler and it *will* work for your case).

jpvalenz :

Mar 24, 2017

I hace the following rules:

"Include everything" option
  include   file   *.pdf
  exclude   file   *

I want to only backup the pdf files, but it seems that is not working.

Can you help me?

Alex Pankratov :

Mar 25, 2017

What do you mean by "not working" exactly?

The setup looks absolutely fine to me.

jpvalenz :

Mar 28, 2017

At the end it exclude everything, even the pdf files.

I seems that the filter doesn't stop at the "include" line but at the exclude everything

jpvalenz :

Mar 28, 2017

It seems to work now... maybe I did it something wrong. Thanks

mcstaycool :

Mar 29, 2017

hello guys, the app cannot backup / copy to destination all files with filename begins with ._ and said Error:file not found, what can i do to include this type of files?


Alex Pankratov :

Mar 29, 2017

@Mc - need more context to give any sort of meaningful advice. Most likely it's a limitation of your destination device (I'm guessing it's some form of NAS) in that it keeps these filenames reserved for its internal use. There was a device that didn't allow creating "p2p" directory, for example. It's odd, but it happens.

mcstaycool :

Mar 31, 2017

Thanks @Alex. This is the case you guess, I am backing up files from HDD from a PC to a NAS by QNAP, those files are created by MAC, such files are over 2000 numbers so I am going to leave it instead of renaming them...

New topic

Made by IO Bureau in Switzerland

Updates Newsletter
Blog & RSS
Follow Twitter
Miscellanea Press kit
Company Imprint

Legal Terms