![]() ![]() ![]() When it comes to windows they have a strange way of actually storing data, for example while a file maybe 1mb in size, when stored on disc its probably going to be 1.1mb the reason for this being is that includes the directory link to the actual file on disc and that estimated size isn't including the possible additional data windows stores with the associated data. If there is no way of retrieving the folder size, is there a way I can programatically retrieve the information displayed by Windows Explorer? Is there a scripted or coded method that will return the actual folder size of C:\Windows None of these methods therefore return the actual size of the directory. The C# code in the following SO answer from a command prompt running as Administrator returns: 35,163,662,628 bytesĪlthough close it still does not display the same as Windows Explorer. With Powershell ISE running as administrator I ran the following powershell snippet from this SO answer "" -f ((Get-ChildItem -path C:\InsertPathHere -recurse | Measure-Object -property length -sum ).sum /1MB) + " MB" ![]() If I run the same command as administrator Files: 77894 If I use the du tool provided by Microsoft sysinternals du C:\Windows On my home desktop which is a Windows machine I right click on C:\Windows folder under properties and it displays: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |