© 2024 R-Tools Technology Inc.
All rights reserved.
Batch mode is a way to apply very complex sets of file filters for automated search for folders and files and marking them for backup or restore. Such sets can be saved for future use and loaded when necessary.
The simple way to specify such a set is to mark all necessary files and folders manually on the Select Files to Restore panel and click the Batch mode button. Depending whether files or folders are on a disk or in a image, their paths may look slightly different.
Sets are stored in the plain text format (the rdf file extension), and can be composed or edited in the Batch window or in any text editor capable of exporting text in this format. Below are the rules that should be followed while writing filter sets.
Every filter set consists of strings each representing a single filter. They are executed in the top to bottom order. If, for example, files are to be marked according to the first string, but unmarked according to the seventh string, they will eventually be unmarked.
Filters can include file names, file paths, and wildcards, like * and ?. They can also have some keys that modify their impact on the search results. If a path in the filter has a space in it, it should be enclosed in quotation marks.
Switches that modify file filters:
-no |
This filter unmarks the folders or files it's applied to. I.g., C:\Photos\*.jpg -no unmarks all jpg files in the C:\Photos folder. |
-file |
This filter is applied to files. May be shorten to -fi . -no-file negates the filter, making it applied not to files. |
-dir |
This filter is applied to folders. May be shorten to -d . -no-dir negates the filter, making it applied not to folders.. |
-case |
This filter is case-sensitive. May be shorten to -c . -no-case makes the filter case-insensitive. |
-local |
This filter is applied to the current folder, not to its subfolders. May be shorten to -l . -no-local negates the filter making it applied to the folder and its subfolders. |
-recursive |
This filter is applied to the current folder and its subfolders. May be shorten to -r . -no-recursive negates the filter making it applied only to the folder. |
-from: |
The initial date from which files will be marked. It may be either in the form of exact date: -from:20210101 , or relative to the current date: -from:now-3week . Has no effect on folders. May be shorten to -fr. |
-to: |
The final date to which files will be marked. It may be either in the form of exact date: -to:20211201 , or relative to the current date: -to:now-1week . Has no effect on folders. |
An exact date may be specified as a local time YearMonthDayHour24MinSec , or as a UTC time YearMonthDayHour24MinSecU .
Provided that there's no switches in the filter (i.g., -recursive ), a file path in the file filter ending with a path separator is applied to the files in the folder and its subfolders. If not, only to the files in the folder.
The file filter D:\Files\ will be applied to the files in the D:\Files\ .
The file filter D:\Files will be applied to the files in the D:\Files and in its subfolders.
Below is an example of filters recursively applied to files in the D:\Files\Pictures folder and its subfolders.
D:\Files\Pictures
D:\Files\Pictures\My_Photo -no
D:\Files\Pictures\My_Photo\Home??????.jpg
Line 1: All files will be marked in the D:\Files\Pictures folder and its subfolders will be marked.
Line 2. All files in the D:\Files\Pictures\My_Photo folder will be unmarked.
Line 3: Files named like Home210312.jpg in the folder D:\Files\Pictures\My_Photo\ will be marked.
If you mark all files in the folder but not the folder itself, its mark will be the following:
The batch will look like:
And the folder will be restored only if there are marked files/folders in it.
If you mark the folder, its mark will be the following:
The batch will look like:
And the folder will always be restored regardless whether there are marked files/folders in it.