Sunday 29 June 2014

Display directories over 1 GB in Windows

      I had to do a bit of a hard drive clean up cause of the hard drive space growing short. My first choice was to do it with some nice command line app. I knew similar functionality is brought by the sysinternals component, disk usage app, it did not quite make the cut though.

In search of a more robust way I found the following solution on stackoverflow, it uses disk usage and windows power shell to print a simple list of all folders above 1GB in size 3 levels down the directory tree:

.\du.exe -c -l 3 C:\ | ConvertFrom-Csv -Header Size,Path | Where-Object { [int]$_.Size -gt 1048576 } | Sort-Object { [int]$_.Size } -descending

( source: http://superuser.com/questions/420973/using-du-exe-sysinternals-is-it-possible-to-show-folders-above-a-certain-size )

       After a little bit of tinkering I've noticed that this exact syntax does not work for me for some reason. It turns out that the newest version of du.exe adds it's own headers on top of the listing it produces. Because of it the script tries to parse these headers as data which ends in parsing errors.
Hence we would need to tell the windows powershell to select the column headers that are already there.

PS D:\Tools\DU> D:\Tools\DU\du.exe -c -l 3 C:\ | ConvertFrom-Csv | select Path,DirectorySize | Where-Object { [int]$_.DirectorySize -gt 1048576 }

This shorter version omits the sorting which can be easily added.

Here's where you can download disk usage app:
http://technet.microsoft.com/en-us/sysinternals/bb896651.aspx

Sunday 8 June 2014

Mundial 2014 TV Guide

An app I was working on with my friend, Igor Redchuk ( http://igorredchuk.blogspot.com/ ) got released. It's an upcoming World Cup 2014 football tournament TV notification guide. So, if you're interested in getting information about channels and being notified about the games you can try it here, the first week's for free: