Overview
FolderSizes supports command-line execution (e.g. from a command prompt) with parameters. These can be used to schedule specific operations, or to call certain functions from a batch file, for example. Note that passing command line parameters into FolderSizes will automatically suppress the display of the splash screen and the welcome wizard (if they are configured to display normally).
Command line parameters are not case sensitive.
Core Parameters
Path (required)
The "path" parameter is required in order for any other command-line parameters to be evaluated (except for the "drivespace" parameter, described in Data Source Parameters). It represents the path that will be scanned (e.g. the target of your analysis). An example which would allow you to scan the temp folder on your D drive would look like:
foldersizes.exe /path:"d:\temp"
Multiple paths can be scanned by separating them with pipe symbols. Note the use of pipes in the example below:
foldersizes.exe /path:"d:\temp|c:\windows|\\server\share"
Another means of passing multiple paths into FolderSizes is via a text (.txt) file. To do so, create and save a text file with one path per line, then pass the path to this text file into the FolderSizes "path" parameter. Doing so will cause FolderSizes to read and analyze the paths this text file contains.
foldersizes.exe /path:"d:\temp\paths.txt"
You can also use one or more fully qualified Snapshot file (.fssx) file paths in place of normal file system paths, in which case the Snapshot file itself becomes the data source for the file system analysis. This feature works for folder, file, and search reports.
foldersizes.exe /path:"d:\temp\snapshot.fssx"
Export
Exports the generated report(s) to disk once the file system analysis has completed. The export file format will be deduced by the file extension passed in. You must provide a fully qualified path for export files:
foldersizes.exe /path:"d:\temp" /export:"d:\tmp\myreport.html"
foldersizes.exe /path:"c:\windows" /export:"d:\tmp\myreport.csv"
foldersizes.exe /path:"c:\program files" /export:"d:\tmp\myreport.xml"
To export a generated report in multiple formats at once, separate the export paths with a pipe ("|") symbol, like this:
foldersizes.exe /path:"d:\" /export:"d:\tmp\myreport.html|d:\tmp\myreport.csv"
Sends all command line (or scheduler) file outputs to one or more email addresses (separated by commas). Requires use of the "export" command line option (see above). For details, see the email integration topic.
foldersizes.exe /path:"d:\temp" /export:"d:\myreport.html" /email:"user@domain.com" /exit
Date
Causes any output path names (specified by the "/export" command line parameter) to include the current date and time in mm-dd-yy_HHMMSS format. For example, if you pass in an "/export" path of "d:\temp\test.html" and include the "/date" parameter, the output path will be transformed into "d:\temp\test_01-03-04_092322.html" (except the current date and time will be used). Useful when exporting file analysis results to a common folder and wish to keep the file names unique (e.g. so previous files are not overwritten).
foldersizes.exe /path:"d:\" /export:"d:\myreport.xml" /date
Exit
Causes FolderSizes to exit once all the command line scanning options are completed. This allows for the generation of an HTML report (for example) on a scheduled basis, with FolderSizes automatically terminating in between executions. This command line parameter takes no arguments.
foldersizes.exe /path:"d:" /export:"d:\largest_files.html" /exit
Minimized
Causes FolderSizes to launch in a minimized state. IMPORTANT: Can ONLY be used in combination with the /exit command line parameter.
foldersizes.exe /path:"d:" /export:"d:\largest_files.html" /minimized /exit