-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilecleaner.ini
78 lines (71 loc) · 5.34 KB
/
filecleaner.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
##############################################################################################################################################################################################################
# FileCleaner configuration file
# FileCleaner created by Borys Tyukin, 2012
##############################################################################################################################################################################################################
#
# This configuration file defines retention rules to the target folders.
# For every target root folder, add an entry here and set file selection criteria and actions to apply when it matches to a file.
# Important: More than one rule can be defined for the same folder.
# If more than one rule will match the same file, the rule which defined last in this configuration file, will be applied.
#
##############################################################################################################################################################################################################
# Parameters:
#
# | Comma-delimited list of subfolder name patterns.
# | All subfolders will be processed by default. Alias -sf.
# | target folder to start scanning from | E.g. -sf *download*, C:\TEMP*
# | |
# \\sharedfolder -files *.dat ; *-tt.txt -excludeFiles main*.txt -minModificationAge 15days -subFolders * -excludeSubFolders *data*;X:\Documents* -action delete
# ^ ^ ^ ^ ^
# | | |See "Files selection criteria" below | |
# | | Same as -files but to exclude files | Same as -subFolders | See "Actions to apply" below
# | | from search. Alias -xsf | but to exclude specified subfolders
# | | E.g. -xsf *.csv,*.log | from the search
# | Comma-delimited list of file name patterns to include. | E.g. *History*, C:\Documents*
# | All files by default. Parameter alias -f.
# | E.g. -f *.txt,*.dat
#
#
# Files selection criteria:
# -------------------------------------------
#-minModificationAge (alias -minmage) - Include files, modified more than X hours/days/months/years ago. No space between X and time unit! E.g. -minmage 10days
#-maxModificationAge (alias -maxmage) - Include files, modified within last X hours/days/months/years. No space between X and time unit! E.g. -maxmage 2hours
#-minCreationAge (alias -mincage) - Include files, created more than X hours/days/months/years ago. No space between X and time unit! E.g. -mincage 2years
#-maxCreationAge (alias -maxcage) - Include files, created within last X hours/days/months/years. No space between X and time unit! E.g. -maxcage 1months
#-minSize (alias -mins) - Include files with file size more than X b/kb/mb/gb/tb. No space between X and size unit! E.g. -mins 10mb
#-maxSize (alias -maxs) - Include files with file size less than X b/kb/mb/gb/tb. No space between X and size unit! E.g. -maxs 1tb
#
# Actions to apply:
# -------------------------------------------
#-action (alias -act) - What to do if file/folder selection criteria matched.
# Supported actions are:
# skip - do nothing
# delete - delete file
# move - move file to the new location specified with -moveto parameter (alias -mt) and optional -tree parameter (alias -tr).
# -tree parameter will create subfolders in the new location.
# If -tree is not used, all files will be moved a single directory and files with the same names will be overwritten
# E.g.
# -action skip
# -action delete
# -action move -moveto X:\archive -tree
# -action move -moveto X:\archive
#
##############################################################################################################################################################################################################
# Examples:
# Delete files, modified over 10 days ago
#D:\Data -minmAge 10days -action delete
# Move files modified over 2 months ago to Z:\archive folder and mirror source folder structure
#D:\Data -minmAge 2months -action move -moveto Z:\archive -tree
# Delete files older than 30 days but only from subfolders named like TEMP1, TEMP2 etc:
#Z:\archive -subFolders *TEMP* -minmAge 30days -action delete
####################################################################
# Example below shows that more than one rule can be defined for the same folder/files
# If a file will match more than one rule, the rule which was defined last in the configuration file will be applied.
# This is a very powerful feature that allows to build complex rules.
# This can be easily tested if you run Filecleaner with -reportonly parameter - all rules will be processed abd you can check them in log file but won't be actually run.
#
# If Z:\archive\1.dat file was modified over 30 days ago, it won't get deleted because the following rule will exclude *.dat files (apply skip action):
#
#Z:\archive -minmAge 30days -action delete
#Z:\archive -files *.dat -action skip
####################################################################