A few months ago, I re-organized my computer to use "Volume Mount Points" and NTFS junctions instead of mapping every disk partitions to a letter.
Basically, I created a folder that contains all the "Volume Mount Points" and another folder that use NTFS junctions to make it appear like "one huge organized hard drive".
It works really well and it's easy to maintain using the "COPY MAKELINK=junction" feature but I'm missing a way to easily see which of my disks are getting full.
After a while, I grew tired of opening the "Computer Management \ Disk Management" application so I made a small application to show the free space of my volumes, based on this:
foreach (System.Management.ManagementObject volume in
new System.Management.ManagementObjectSearcher("Select * from Win32_Volume").Get())
{
foreach (string propertyName in new string[] {
"Name",
"Label",
"FileSystem",
"FreeSpace",
"Capacity",
"Access", "Automount", "Availability", "BlockSize", "Caption", "Compressed", "ConfigManagerErrorCode",
"ConfigManagerUserConfig", "CreationClassName", "Description", "DeviceID", "DirtyBitSet",
"DriveLetter", "DriveType", "ErrorCleared", "ErrorDescription", "ErrorMethodology", "IndexingEnabled",
"InstallDate", "LastErrorCode", "MaximumFileNameLength", "NumberOfBlocks", "PNPDeviceID", "PowerManagementCapabilities",
"PowerManagementSupported", "Purpose", "QuotasEnabled", "QuotasIncomplete", "QuotasRebuilding", "Status",
"StatusInfo", "SystemCreationClassName", "SystemName", "SerialNumber", "SupportsDiskQuotas",
"SupportsFileBasedCompression"})
{
Console.WriteLine("{0} = {1}", propertyName, volume[propertyName] ?? "<null>");
}
Console.WriteLine(new string('*', 80));
}
But it would be even better if I could show that informations directly in my "Volume Mount Points" folder.
Would it be possible to add a new type when a "junction" can be "linked" to a volume? That new type would expose the columns currently associated to the "Local Disk" type ("Free Space", "Filesystem", ""Percent Full", "Percent Free", "Used Space") with, maybe, a few mores ("Volume Size", "Volume Label").
Thanks.