Disk report with folder and file

Hi, can we have a report using Windirstat that will show the endpoints drive contents in a report:

see the above for some code, i not sure if this will help.


Ok, so i have tested this: windistat is installed on serverA, i ran in CMD, “C:\Program Files (x86)\WinDirStat\windirstat.exe” \serverb\c$ and sure as it pops up the program window and shows me the C drive of serverB,

so what the script needs to do is silently instll the windirstst exe, run the a silent scan, then create a report.

Hi @dittoit

We will analyze and update the script request once it has been completed.

Thank you.

I am unable to get the c drive report into text format through the windirstat tool
so i came up with a new tool named “SpaceSniffer” that will definetely helps you to send the disk report to the your mail.
Please refer the script in the below page


please see the below:

The procedure didn’t run.

File “<string>”, line 52
req = urllib2.Request(URL, headers={‘User-Agent’ : “Magic Browser”})
IndentationError: unexpected indent

Script had bad formatting. I fixed and its working now for me. Great script idea! See attached

disk-report-with-folder-and-file.json (5.88 KB)

Hi @eztech
, thanks for the script, is there any chance it could be changed to use other SMTP servers like Microsoft and office 365?

It is possible to use other SMTP servers like Microsoft and office 365 to get the disk report.For this you just need to edit server details in the same script.
Please edit the below lines in the code

In def mail():
In Line 94 fromaddr = “test@gmail.com” #### Please give the server from-mailaddress according to the server your choosing(Microsoft or office365)
In Line 95 toaddr = “to@gmail.com” #### Please give the server to-mailaddress(Microsoft or office365 orelse gmail).To which account you want to send the report
In Line 117 server = smtplib.SMTP(‘smtp.gmail.com’, 587)
smtp.gmail.com”-> Here please provide the SMTP server address (Microsoft or office365) for Eg. “smtp.office365.com
“587” -> Here please provide the SMTP port of the server (Microsoft or office365)
In Line 119 server.login(fromaddr,‘emailpassword’) ###### In ‘emailpassword’ field please provide the password of your account your given in the ‘fromaddr’ field

Hi, the script works great, BUT its is impossible to find where the large files are, can we change the formatting so it shows the folders in size order large>small instead of just listing the folder structure and size?

Hi @dittoit

  We will analyze and update the script request once it has been completed.


Hi @dittoit

The script we have provided will produce results with sorting the folders in descending and too sorting files in that folder as you have asked. Could you please check once and contact us back with what you exactly want if needed ?

Thank you.

Hi! I set up a customized monitor to check if the free disk space is lower than 10% and if it is, it will run a procedure to “get the disk report of the system using the space sniffer tool” and send an alert by opening a service desk ticket. it works but the report goes to separate email or alert. is there a way for me to get the alert and report in one email? or if not, can you help me customize the procedure so that the report shows the hostname? the report only shows space status of the disk and folder.

thank you

@gracie ,

We have coordinated with our Script Developers for your request. We will provide you an output of their results as soon as possible.