TextExport¶
Description
Exports the file system branch of the currently selected directory to a plain text file.
Syntax
TextExport (ExportPath : <String>, ExportFullBranch : <Boolean>, IncludeHeader : <Boolean>, IncludeUnit : <Boolean>, AppendToFile : <Boolean>)
Parameters
- ExportPath
The full path of the export file (including the exported file name). You can use environment variables as well as “%DATE%” and “%TIME%” in the file path.
- ExportFullBranch
Indicates if the export will include the full directory branch or only expanded directories.
- IncludeHeader
Indicates if a header with general information about the root directory/drive will be included.
- IncludeUnit
Indicates if size units and thousand separators will be included in the export, or if sizes are exported as plain numbers.
- AppendToFile
Indicates if the export will be appended to an existing file, or if an existing file will be overwritten.
Example
# PowerShell
$SOS.TextExport("C:\Temp\SOS\textexport.txt", $True, $False, $True, $True)
' VBS
SOS.TextExport "C:\Temp\SOS\textexport.txt", True, False, True, True
Produces a report exported to a plain text file named “textexport.txt”, stored at “C:TempSOS", with a fully expanded directory, including size units but no header. If a file of this name already exists, the new report will be appended to the existing file content.