Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a program or a script I can run against a csv containing thousands of UNC paths? Something not very intrusive - simply looking to gather file sizes of each.

Thanks.

share|improve this question
add comment

1 Answer

You should be able to mash together a bunch of components of PowerShell fairly simply to do what you want.

However, due to the nature of gathering sizes of a folder containing many files, it will be relatively intrusive - i.e. IO-intensive and will take a while to run. This is a consequence of how filesystems work (the size of a folder is not stored anywhere, it must be computed by traversing the folder recording the sizes of files as it goes.

There's an article in the TechNet Library about determining the size of a (single) folder which would probably be useful to you.

PowerShell also has cmdlets called Import-Csv and Export-Csv which will be useful for dealing with CSV data.

share|improve this answer
    
Thanks for your help. –  jj2019 Dec 5 '11 at 3:52
    
You're welcome, and welcome to Server Fault! If this answer is to your satisfaction, please mark my response as "accepted" by clicking the green check besides the answer. –  Per von Zweigbergk Dec 5 '11 at 7:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.