Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

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

Your Answer


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.