Description
Exports any SpaceObServer list to a plain text, CSV or Excel file.
Syntax
ListExport (ExportPath : <String>, ListType : <String>, IncludeHeader : <Boolean>, IncludeUnit : <Boolean>, AppendToFile : <Boolean>)
Parameters
ExportPath |
The full path of the export file (including the exported file name). |
ListType |
Defines what kind of file list will be exported. This parameter can be one of the following strings: "details": Exports the "Details" list. Note: The lists will be exported with the columns that were last used in the user interface. |
IncludeHeader |
Indicates, if a header with general information about the root directory/drive will be included. |
AppendToFile |
Indicates, if the export will be appended to an existing file, or if an existing file will be overwritten. |
Example
1.) SOS.ListExport "C:\Temp\SOS\detailsexport.txt", "details", False, False
Exports a file list to "C:\Temp\SOS\detailsexport.txt", containing all the columns chosen in the Options dialog. The file won't contain a special header and will overwrite any already existing files of the same name.
2.) SOS.ListExport "C:\Temp\SOS\extensionsexport.csv", "extensions", True, False
Exports a file list to "C:\Temp\SOS\extensionsexport.csv", mentioning all the file extensions in the current directory branch and the amount of HD space every file type occupies. The file will contain a special header and will overwrite any already existing files of the same name.
3.) SOS.ListExport "C:\Temp\SOS\usersexport.xls", "users", False, True
Exports a file list to the Excel file "C:\Temp\SOS\usersexport.xls", stating how much HD space each user on this computer occupies. The file won't contain a special header and will append the list to the content of any already existing files of the same name.
4.) SOS.ListExport "C:\Temp\SOS\topfilesexport.xlsx", "topfiles", True, True
Exports a file list to the Excel 2007 formatted file "C:\Temp\SOS\topfilesexport.xlsx", containing a list of the 100 largest files in the current directory branch. The file will contain a special header and will append the list to the content of any already existing files of the same name.
5.) SOS.ListExport "C:\Temp\SOS\dupfilesexport.csv", "dupfiles", True, False
Exports a file list to "C:\Temp\SOS\dupfilesexport.csv", containing all the file duplicates (as well as their locations) found in the current directory branch. The file will contain a special header and will overwrite any already existing files of the same name.