Jump to content
Sign in to follow this  
llewxam

MyDirStat

Recommended Posts

llewxam
This is my replacement for WinDirStat which I coded ages ago and never bothered to share before.  I have used this tool many times while working on neglected servers and old workstations that have no or very little free space on a hard drive, and it has helped locate the source of the problems.  Ahhhh, good old SQL error logs and Norton backup files!!   :D 
 
My only real gripe with WinDirStat is the speed.  I couldn't help but think it should be faster than that, so I wrote this to find out how fast it could be.  I found that there were 2 recursive file find routines that were best for different purposes, one for local volumes and one for network drives.  My script will determine which you are searching and use the routine most optimized for that task.
 
Another thing about WinDirStat that I dislike is that you have to install it on the machine, this being a standalone is very nice.  Yet another thing I dislike about WinDirStat is that it tries to multitask the enumeration, and I think that is the #1 reason that my tool is faster - mechanical hard drives don't multitask!  SSD drives do, but my tool is faster on my SSD than WinDirStat anyway, so not all of the speed gains are from that difference.
 
The only thing WinDirStat really has on MyDirStat is that mine re-searches each folder as you move up and down the drive, I played around with a global array but honestly decided I would rather have it update each time rather than a static array built on the initial run, so maybe that isn't a plus for WinDirStat.  Even when traversing folders very heavily with this tool to find the biggest folders and delete the space hogs it isn't bad, subsequent scans go much faster than the initial scan.
 
Notable discrepancy:
At least under Windows 7 x64, MyDirStat will report a folder "C:UsersAll Users" which is actually C:ProgramData, so the numbers below reflect that glitch.  Being that this is rather old code and I'm just posting it for fun I am not going to hunt down a fix (at this time...).
 
 
All times were 2 consecutive runs with the programs, time taken was the second run.
 
 
NAS (Promise NS4300N with 3 WDC WD15EARS-00Z5B1 in RAID-5, GB LAN connection)
WinDirStat               MyDirStat
 
Time
14:49                        1:30
 
Files
83,536 (2.1TB)         83,536 (2.10TB)
 
RAM Usage
30.9MB                     10.3MB
 
 
 
C: (120GB OCZ RevoDrive 3 PCI-e RVD3-FHPX4-120G)
WinDirStat                MyDirStat
 
Time
19 seconds               7 seconds
 
Files
138,814 (62.6GB)     140,172 (66.24GB)
 
RAM Usage
55.3MB                      16.4MB
 
 
As if the speed difference of the SSD wasn't bad enough, look at the difference on the NAS!!!   :
 
Since I have some extra functions built in there are a couple required files to go along with the main script, all of which are used to delete or empty folders (empty leaves the actual folder behind).  You must have the files in the included ZIP in the script directory.  RoboCopy and the included batch files have been discussed in another thread on the forum previously:
 
 
Enjoy
Ian
 
Edit 09/04/2014 - updated code, previous version downloaded 130 times

extras.zip

MyDirStat.au3

Edited by llewxam
  • Like 1

My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites
LastHopeLost

Nice work!  The interface looks good and it works quickly.

Thanks!

LastHopeLost

Share this post


Link to post
Share on other sites
llewxam

Glad you like it.

Ian


My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites
Draygoes

I love it! Very helpful. :thumbsup:

I have seen (and used) commercial products that take much longer than this.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
llewxam

hahahaha, thanks to kaesereibe and Chimaera.  I stupidly assumed that the amount of local and mapped drives I had would reflect the most that others would encounter.  I'll have a look soon and set it up more dynamically, should be pretty simple to have the script adjust to allow for more drives prior to drawing the GUI.

Thanks

Ian


My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites
llewxam

How's this?

mds.jpg


My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites
spudw2k

Better, but I'd even recommend a scroll bar.  I don't see too many folks using all 26 drive letters, but I'm sure someone may...at best nothing would prevent that.  I think I've seen a clever GUI Scrollbar UDF around here somewhere.  If I find it I'll link it...unless someone beats me to it.

edit: I think this is it, but when I try to download the ZIP I can't seem to open it with Native Win 7 or WinZip 17.5
'?do=embed' frameborder='0' data-embedContent>>

Nice app overall though BTW.

Edited by spudw2k

Share this post


Link to post
Share on other sites
llewxam

Thanks spudw2k, I considered adding something like:

if GUI height > desktop height then reduce size of each drive section, or go to a listview sort of thing, or do something with a scroll.

This was more of a quick hack to make things better if not perfect.  When I get more time to focus on this app I have at least one other bug to track down (the above-mentioned C:UsersAll Users->C:ProgramData thing), so will get more thorough with the potential for another drive letter overload.

Ian


My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×