DeepT
April 27th, 2009, 10:25 AM
That will map out where all your disk space being used, either by number of bytes being used, or number of files being used.
The first problem is finding out how much space is being consumed by directory X and all it's sub directories. I notice when you bring up the properties menu of a folder (or disk) that windows will very quickly come up with the totals. I am assuming that there is some kind of API call that ties into an existing database that can compile that information very quickly. If I manually crawled through program files, I think it would take far longer. Does anyone know what API call may be used for this information?
The second problem is graphing this information. I can come up with my own simple controls if I need to, but it would be much nicer to use pre-made controls to display this information. A Pie chart with labels would be great, but the only way I know of how to do this (circa .NET 2.0 ) is to use an excel assembly. The problem with this is that the end user needs to have excel installed to use my program. At worst I can use use a basic bar graph. With the new WPF stuff, are there some controls I can use to create a better graph?
Here is what I generally want to do:
My program starts at c: and gives you an "explorer like" view of the files and folders. Each folder / file will represent a portion of 100% of the disk space. I will hide the windows folder and not count it (I do not want some idiot deciding they are running Vista 64 bit therefor system32 is wasted space). At a glance you can see which folders contain the most % of disk space and file space. The user can now select files and folders to explore / delete ( many at this top level will be protected from deletion by from my program).
When you pick a folder to explore, it will become the new 100% and everything under it will be a % of that. And so on as you move around your file system.
The reason I want a tool like this is because of the frequency of uninstalling an application (such as a game you no longer play) and after it is uninstalled, there can still be 10s of 1000s of files left, taking GIGs of space just sitting somewhere in MyDocuments/.....Local/.../ApplicationYouRemoved/Data.
It would be nice if Windows added the concept of program ownership so you could track down all the files generated by X no matter how well hidden they might be.
The first problem is finding out how much space is being consumed by directory X and all it's sub directories. I notice when you bring up the properties menu of a folder (or disk) that windows will very quickly come up with the totals. I am assuming that there is some kind of API call that ties into an existing database that can compile that information very quickly. If I manually crawled through program files, I think it would take far longer. Does anyone know what API call may be used for this information?
The second problem is graphing this information. I can come up with my own simple controls if I need to, but it would be much nicer to use pre-made controls to display this information. A Pie chart with labels would be great, but the only way I know of how to do this (circa .NET 2.0 ) is to use an excel assembly. The problem with this is that the end user needs to have excel installed to use my program. At worst I can use use a basic bar graph. With the new WPF stuff, are there some controls I can use to create a better graph?
Here is what I generally want to do:
My program starts at c: and gives you an "explorer like" view of the files and folders. Each folder / file will represent a portion of 100% of the disk space. I will hide the windows folder and not count it (I do not want some idiot deciding they are running Vista 64 bit therefor system32 is wasted space). At a glance you can see which folders contain the most % of disk space and file space. The user can now select files and folders to explore / delete ( many at this top level will be protected from deletion by from my program).
When you pick a folder to explore, it will become the new 100% and everything under it will be a % of that. And so on as you move around your file system.
The reason I want a tool like this is because of the frequency of uninstalling an application (such as a game you no longer play) and after it is uninstalled, there can still be 10s of 1000s of files left, taking GIGs of space just sitting somewhere in MyDocuments/.....Local/.../ApplicationYouRemoved/Data.
It would be nice if Windows added the concept of program ownership so you could track down all the files generated by X no matter how well hidden they might be.