Filtering the Files by their Size
Using nnBackup you can filter the files by their attributes (-a, -ax), file names masks (-m, -x), file creation/modification dates (-D, -DC, -DW), and by the size of the files (in bytes). There are special command line options -LT, -GT, -EQ and the modifier -OR available for this purpose.
The -LT command line option is used to process only those files, which size is smaller than specified one (in bytes). For example:
nnbackup.exe -i c:\data -o d:\backup -LT 50000
Explanation: Copy from directory c:\data to d:\backup all the files which size is smaller than 50000 bytes.
The -GT command line option is used to process only those files, which size is greater than specified one (in bytes). For example:
nnbackup.exe -i c:\data -o d:\backup -GT 50000
Explanation: Copy from directory c:\data to d:\backup all the files which size is greater than 50000 bytes.
The -EQ command line option is used to process only those files, which size equals to the specified one (in bytes). For example:
nnbackup.exe -i c:\data -o d:\backup -EQ 50000
Explanation: Copy from directory c:\data to d:\backup all the files which size equals to 50000 bytes.
You can use several different size-filtering options in your command line. By default, the options -LT, -GT and -EQ are combined with a logical 'AND'. For example:
nnbackup.exe copy -i c:\data -o d:\backup -GT 50000 -LT 200000
Explanation: Copy from directory c:\data to d:\backup all the files which size is greater than 50000 bytes and smaller than 200000 bytes.
Sometimes, when filtering files by their size, you may want to use logical 'OR' instead of logical 'AND'. There is a special modifier, created especially for this purpose: the modifier -OR replaces logical 'AND' with logical 'OR' for command line options -LT, -GT and -EQ. For example:
nnbackup.exe copy -i c:\data -o d:\backup -LT 50000 -GT 500000 -OR
Explanation: Copy from directory c:\data to d:\backup all the files which size is smaller than 50000 bytes or greater than 500000 bytes.
There is another one interesting example:
nnbackup.exe copy -i c:\data -o d:\backup -LT 50000 -EQ 50000 -OR
Explanation: Copy from directory c:\data to d:\backup all the files which size is smaller or equals to 50000 bytes.
The last one example:
nnbackup.exe copy -i c:\data -o d:\backup -LT 50000 -EQ 50000 -GT 50000 -OR
Explanation: Copy all the files from directory c:\data to d:\backup: the files which size is smaller than 50000 bytes, or equals to 50000 bytes, or is greater than 50000 bytes.