§ Name the script and describe what it does.
§ Define the action for when the script finds the files — delete, or back up and delete.
§ Define or find the folders in which the script will look.
§ Create filters to define the criteria for deleting files.
To create a new File Cleaner script:
1 In the File Cleaner window, click Add.
2 In the Script name box, type a name for the new script.
3 In the Description box, type a brief description of what the script does.
4 Click Add Action. (The File Cleaner dialog box asks you if you want the default action to be to back up the files before deleting them. Otherwise, they are permanently deleted. The best practice is to back up the files before deleting them.)
5 Click Yes to accept the default action, or No to permanently delete the files.
6 To use the same script to back up some files and delete others, repeat the step.
7 Click Add Find and select a folder you want searched. To include the subfolders, select the Include subfolders check box. Repeat this step for each folder you want to add.
9 From the Filter type list, select a filter type for the script. After you choose the filter type, you will define it using filter arguments, which provide the details. Use the list below to set up one or more Filter types.
File Name
Finds files by file name characteristics. Choose Include so that your list includes these types of files. In Filter arguments, list the parts of the file names that you want to find. For example, to find all your birthday photos, you might type: birthday;party;bday;patrick;clown
This filter will find any files that have any of the above terms in the file name. You can also use wildcard characters.
File last written date
Finds files that were last written before or after a specified date. Choose Include, and in Filter arguments, choose an Older than or Newer than date.
File last accessed date
Finds files that were last opened or accessed before a specified date or after a specified date. Choose Include, and in Filter arguments, choose an Older than or Newer than date.
File size
Finds files that are larger or smaller than a specified size. Choose Include, and in Filter arguments, choose a Greater than or Less than or equal to size.
NOTE: The size box is set to kilobytes. If you want to use megabytes, multiply the size by 1000. For example, if you want files greater than 3 MB. enter 3000 in the KB box.
Special exclude files
Finds and excludes important files from your list of files. This filter has a list of file names that should never be deleted. Add this filter to all of your custom scripts to make sure you don’t accidentally find and delete important files in your custom search. You can add other file names, but you cannot remove any of those that are listed.
File attributes
Finds files by the file attributes — Read Only, Archive, Hidden, and System. To make sure your list doesn’t include these types of files, choose Exclude.
Version information
Finds files that match specified text in their version information. You can choose the field you want to use and then add the text you want searched. The fields include Comment string, Company name, File description, File version, Legal copyright, Product name, and Product version. For example, to find files related to VCOM products, you would choose Company name, Include, and type in VCOM as the search string.
Location
Finds and excludes files that are in a specified location. The Include option is not available with this filter type. Choose a folder that you want excluded from the search and the search will exclude it and all its subfolders.
11 Repeat the steps to add more filters.
When you run a script, File Cleaner first finds all of the files in the location you specified. Then, it runs the Include filters. Finally, it runs the Exclude filters.
12 To delete a line in the Script box, select the line and click Delete Line.
13 When finished, click OK.
See Also
Editing Scripts in File Cleaner