SpaceObServer.Application.ListExport

<< Click to Display Table of Contents >>

Navigation:  OLE Automation > Application > Methods >

SpaceObServer.Application.ListExport

Description

Exports any SpaceObServer list to a plain text, CSV or Excel file.
 

Syntax

ListExport (ExportPath : <String>, ListType : <String>, IncludeUnit : <Boolean>, AppendToFile : <Boolean>, ExpandedList : <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.

ListType

Defines what kind of file list will be exported. All available list types can be found under

Available list types are:
 

Name / ID

Description

scantree

Exports the directory tree.

detailslist

Exports the details list.

extensionslist

Exports the extensions list.

userslist

Exports the users list.

topfileslist

Exports the top 100 files list.

dupfileslist

Exports the duplicate files list.

scanslist

Exports the list of scans.

ConfigureScans

Exports the information of the Configure Scans dialog.

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 will be included.

AppendToFile

Indicates, if the export will be appended to an existing file or if an existing file will be overwritten.

[optional]IncludeTitle

(Optional-Parameter) Indicates, if a Title with general information about the exported list will be included (Default value is "false").

[optional]ExpandedList

(Optional-Parameter) Indicates if expandable lists (extensionslist, dupfileslist) will be exported with all subitems or not (Default value is "false").

 
Example

1.)

        $SOS.ListExport("C:\SpaceObServer Exports\DetailsExport.txt", "detailslist", $False, $False, $False) #PowerShell

   SOS.ListExport "C:\SpaceObServer Exports\DetailsExport.txt", "detailslist", False, False, False 'VBS

Exports a file list to "C:\SpaceObServer Exports\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("\\Server1\Exports\SpaceObServer\ExtensionsList.csv", "extensionslist", $True, $False, $True) #PowerShell

   SOS.ListExport "\\Server1\Exports\SpaceObServer\ExtensionsList.csv", "extensionslist", True, False, True 'VBS

Exports a file list to "\\Server1\Exports\SpaceObServer\ExtensionsList.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:\SpaceObServer Exports\Users.xlsx", "userslist", $False, $True, $False) #PowerShell

   SOS.ListExport "C:\SpaceObServer Exports\Users.xlsx", "userslist", False, True, False 'VBS

Exports a file list to the Excel file "C:\SpaceObServer Exports\Users.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:\SpaceObServer Exports\Top100Files.xlsx", "topfileslist", $True, $True, $True) #PowerShell

   SOS.ListExport "C:\SpaceObServer Exports\Top100Files.xlsx", "topfileslist", True, True, True 'VBS

Exports a file list to the Excel 2007 formatted file "C:\SpaceObServer Exports\Top100Files.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:\SpaceObServer Exports\DuplicateFiles.csv", "dupfileslist", $True, $False, $True) #PowerShell

   SOS.ListExport "C:\SpaceObServer Exports\DuplicateFiles.csv", "dupfileslist", True, False, True 'VBS

Exports a file list to "C:\SpaceObServer Exports\DuplicateFiles.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.

6.)

   $SOS.ListExport("C:\SpaceObServer Exports\ListOfScans.csv", "scanslist", $True, $False, $True) #PowerShell

   SOS.ListExport "C:\SpaceObServer Exports\ListOfScans.csv", "scanslist", True, False, True 'VBS

Exports a file list to "C:\SpaceObServer Exports\ListOfScans.csv", containing all the scanned roots included in the currently connection SpaceObServer database. The file will contain a special header and will overwrite any already existing files of the same name.

 

Remarks

In order to configure the visible columns for the list exports you can use the ListColumnVisible property.