WizTree Guides

How to use some of WizTree's advanced features

Exporting WizTree File Data to CSV File


Press Ctrl+Alt+E or right click on a file/folder and select "Export to CSV file...". The selected files and/or folders will be exported to a comma separated value file (.CSV format). The information exported will depend on which view is currently active (Tree View or File View). If no files or folders are selected then ALL files and folders will be exported.

e.g. If the main "C:\" folder is selected, then the entire contents of C:\ will be exported


If "C:\Windows" and "C:\Users" are both selected then the contents of both of these folders will be exported


Format is as follows:
File Name, Size, Allocated, Modified, Attributes, Files, Folders


For folders, the file name will always end with a "\", e.g. "C:\Windows\"
For folders, the Size and Allocated fields will be the total size of all files and folders contained within that folder.
For files, the Size and Allocated fields will be for that individual file only.
The "Allocated" value will be prefixed by a leading 0 if the file is a "hard link", indicating that it does not take up any additional space on the hard drive and should not be counted as part of the total space used.
Modified date is in format "yyyy/mm/dd HH:mm:ss"
Attributes is stored as a value and is a combination of the following values added together:
1 = Read Only (R), 2 = Hidden (H), 4 = System (S), 32 = Archive (A), 2048 = Compressed (C)
e.g. If a file is Read Only and Hidden it will have attribute value = 3 (1 + 2)
The Files and Folders values only apply to folders and show the total number of files and folders within that folder.


Copying file/folder data to Clipboard


Press Ctrl+Alt+C or right click on a file/folder and select "Copy file and size info to clipboard". File size and name information will be copied to the clipboard in a human friendly format, suitable for pasting into emails, support forum posts, or text documents. The files will be indented to match the current tree structure, and only currently visible files within the selection will be included.


For example, if you expand the "C:\Users" folder within the tree by clicking on the "+" next to it, and then right click on it and select "Copy file and size info to clipboard", you will get something like this copied to the clipboard:


            64.82 GB    C:\Users
            59.15 GB      C:\Users\Bob
             5.62 GB      C:\Users\Public
            19.99 MB      C:\Users\UpdatusUser
            15.75 MB      C:\Users\Mcx1
            11.07 MB      C:\Users\DefaultAppPool
             2.70 MB      C:\Users\Default
           174 Bytes      desktop.ini
                   0      C:\Users\Default.migrated
                   0      C:\Users\Default User
                   0      C:\Users\All Users

If this function is used on the "File View" then file and size information for the currently selected files will be copied to the clipboard, in a format similar to the following:


             6.75 GB  C:\pagefile.sys
             3.81 GB  C:\System Volume Information\{579260ea-c771-11e7-9c10-b4749f719216}
             3.21 GB  C:\Users\Bob\VirtualBox VMs\XP\Snapshots\{086cc618-9a46-438b-acf1-d90f001990b7}.vdi
             2.93 GB  C:\hiberfil.sys
             2.23 GB  C:\$RECYCLE.BIN\S-1-5-21-4195858667-1952806270-3254110446-1001\$RYF1ZAO.vdi

Command Line Export


As of WizTree 3.18 it's now possible to automatically export file data to CSV file via the command line.


For 32 bit Windows:
wiztree.exe "drive/folder" /export="filename" [/filter="filespec"] [/filterexclude="filespec"] [/admin=0|1] [/exportfolders=0|1] [/exportfiles=0|1] [/sortby=sortoption] [/exportmftrecno=0|1]

for 64 bit Windows:
wiztree64.exe "drive/folder" /export="filename" [/filter="filespec"] [/filterexclude="filespec"] [/admin=0|1] [/exportfolders=0|1] [/exportfiles=0|1] [/sortby=sortoption] [/exportmftrecno=0|1]


(Note that 32 bit wiztree.exe will auto launch wiztree64.exe with the same parameters if it detects it's running on 64 bit Windows)


"Drive/folder" can be a drive letter like "C:" or a folder name like "C:\Windows"

Use %d and/or %t in export filename to include current date and time. %d will be replaced with date in YYYYMMDD format, %t will be replaced with time in HHMMSS format


Filter option can be used to export only files matching the file specification, e.g. "*.mp3". The entire path and file name is used when matching. Separate multiple file extensions with | (pipe)
e.g. "*.mp3|*.wav|*.ogg"


FilerExclude is similar to filter but will exclude any files that match the file specification.


Use the /admin flag to set desired admin mode (fast MFT file scanning is only available when running as administrator - use the /admin=1 parameter). To set WizTree up to run with Administrator rights via Windows Scheduler you will have to configure it to "run with highest privileges" and select an administrator user account to run it. Running it this way will prevent the Windows UAC popup from appearing.


By default both files and folders will be exported. Use the exportfolders / exportfiles parameters to disable file and/or folders from export. e.g. to prevent folders from being exported:
/exportfolders=0


sortoption can be
0 = sort by file name (default)
1 = sort by file size (desc), file name
2 = sort by allocated size (desc), file name


The MFT record number can be included in the export data file by using the exportmftrecno parameter. This record number can be used as a unique file ID number. Note that the MFT record number is only valid when exporting an entire NTFS formatted drive and when WizTree is launched with administrator rights.


Advanced export options:
      /exportalldates=1 - Will export Last Accessed and Created Dates for each file
      /exportallsizes=1 - Will export total size and allocated size of folder (excluding sub folders)
      /exportsplitfilename=1 - Will export the root,folder,filename,extension separately
      /exportdrivecapacity=1 - Will export the total drive capacity (on first record only)


To export file types:
wiztree.exe "drive/folder" /exportfiletypes="filename" [/admin=0|1] [/filter="filespec"] [/filterexclude="filespec"] [/sortbyfiletypes=sortoptionfiletypes]

or

wiztree64.exe "drive/folder" /exportfiletypes="filename" [/admin=0|1] [/filter="filespec"] [/filterexclude="filespec"] [/sortbyfiletypes=sortoptionfiletypes]


/exportfiletypes can be used together with /export parameter to export 2 csv files based on the same scanned data.


sortoptionfiletypes can be
0 = sort by file name
1 = sort by file size (desc), file name (default)
2 = sort by allocated size (desc), file name


Examples:

Export all files and folders in C: drive to "C:\temp\exportYYYYMMDD_HHMMSS.csv", running with admin rights (to enable MFT scan):
wiztree.exe "C:" /export="c:\temp\export%d_%t.csv" /admin=1

Export all *.mp3 and *.wav files (excluding folders) in C:\Users to "c:\temp\audiofilesYYYYMMDD_HHMMSS.csv", using non administrator mode:
wiztree.exe "C:\Users" /export="c:\temp\audiofiles%d_%t.csv" /filter="*.mp3|*.wav" /admin=0 /exportfolders=0

Export all files and folders containing the word "test" excluding the D:\Temp folder on the D: drive to "f:\export\testfiles.csv":
wiztree.exe "D:" /export="f:\export\testfiles.csv" /filter="test" /filterexclude="d:\temp\"

Export all file types in C: drive to "C:\temp\exportfiletypesYYYYMMDD_HHMMSS.csv", excluding "C:\temp" folder, running with admin rights (to enable MFT scan):
wiztree.exe "C:" /exportfiletypes="c:\temp\exportfiletypes%d_%t.csv" /admin=1 /filterexclude="c:\temp\"

To call wiztree.exe from a batch file script, use start /wait wiztree.exe to wait for the export to complete before moving on to the next line. If you're using 64 bit Windows then use start /wait wiztree64.exe as wiztree.exe will launch wiztree64.exe automatically and return immediately.

e.g. for Windows 32:
start /wait wiztree.exe "D:" /export="f:\export\testfiles.csv" /filter="test"

and for Windows 64:
start /wait wiztree64.exe "D:" /export="f:\export\testfiles.csv" /filter="test"


Command Line MFT Dump


As of WizTree version 3.22 it's possible to dump the MFT file via command line.

For 32 bit Windows:
wiztree.exe "drive" /dumpmftfile="filename"

For 64 bit Windows:
wiztree64.exe "drive" /dumpmftfile="filename"

(Note that 32 bit wiztree.exe will auto launch wiztree64.exe with the same parameters if it detects it's running on 64 bit Windows)


Use %d and %t in filename to have them replaced by the current system date and time (YYYYMMDD and HHMMSS format).


For example, to dump the MFT file for drive D:
wiztree.exe "D:" /dumpmftfile="c:\mftdumps\ddrive%d%t.MFT"