Backup a folder contents but NO subfolders

Aug 14, 2012 at 6:01 PM

I am trying to set the selection file to back up just the files in a particular folder, but none of the subfolders. I'm not sure where my trouble is -- am i using the wrong configuration option, am I using the right option in the wrong way, or did I just mess up the regular expression.

I've tried:


and also:


but it still picks up everything in the "downloads" directory.

I'm also trying to set the selection file to back up the files in a particular folder, and in one of its subfolders but not the others. I tried:


and also:


but it picks up everyhing in the dev directory anyway. What am I doing wrong?

Aug 17, 2012 at 8:30 AM
Edited Aug 17, 2012 at 3:55 PM

Hi dratkins, thank you for your post.

Your first question is "how can I backup a single folder's contents but NOT it's subfolders ?". The answer is simple.
Let's assume you have this folder tree:


.. and you want to backup downloads' contents but want the script NOT to enter and scan in subfolder1, subfolder2, subfolder3 and music. Your script's selection rules will be


This way the script will enter c:\users\dratkins\downloads and will name it "down" but as it encounters the first subfolder (which will be internally managed as "down\subfolder1") it will not enter it as regular expression "^down" surely matches "down\subfolder1". Please note also that the precise keyword for the selector rule is matchstoprecurse (not stoprecurse only as written in your post). What you have entered instead with the regular expression "^down\\.*\\" means : do not recurse any directory path which begins with down and has backslash and have something after the first backslash and again have a backslash. Of course this is not the case of "down\subfolder1": it might be the case of "down\subfolder1\subfolder1.1"

The second question is quite similar. Assuming the directory tree sample depicted before, consider you want to backup downloads' contents and subfolder1 contents, but NOT subfolder2 nor subfolder3 nor music contents. What you will have to specify in your selection criteria is:


Hope this helps.

Aug 23, 2012 at 6:48 PM

Hi dratkins,

it might be of your interest the new release 1.8.1 where you can limit recursion process even by depth.

All the best.