• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1362
  • Last Modified:

How to export file and folder structure to excel spreadsheet

Experts,

I need a script that I can run against file servers to export the folder structure and file lists to a spreadsheet or a csv file that I can import into a spreadsheet. We need to share this with management so they can decide what directories are mission critical.

Thanks in advance for your  help
0
Raymo12
Asked:
Raymo12
  • 4
  • 2
1 Solution
 
Bill PrewCommented:
Can you be more specific about what information you want in the file, like do you want size and date info, etc?  And do you want just folders, or files too?  And do you want to re-curse into subfolders and list those, or just summarize at the first level of folders?

~bp
0
 
Patrick MatthewsCommented:
Raymo12,

Please have a look at this past solution:
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_25063189.html#a26340696

It contains code I've been using for years to output the contents of a directory to an Excel worksheet.  It includes the option of drilling into subfolders, if that's what you want to do.

Patrick
0
 
Raymo12Author Commented:
billprew I actually don't need size and date just folders and files if possible. Pretty much management wants to see whats on each server and decide on a retention plan.

Thanks matthewspatrick I'll have a look at your solution and report back.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Raymo12Author Commented:
mathewspatrick that is one sweet vb module! Is there anyway I can run it against a drive without selecting a folder? I'm trying to think of a way to list all the contents of Server A D:\drive as an example

0
 
Patrick MatthewsCommented:
All you should need to do is select the drive in the dialog box (see attached image).

If you select a drive, you can enumerate it.

Of course, if you choose to drill into the subfolders, you could run out of rows in your Excel worksheet :)

Patrick
Q-26457651.bmp
0
 
Raymo12Author Commented:
Yes, I meant if I were to want to run this on a remote server within the same network. Like browse to a server and it's drive. It seems to work if I map that drive first so that should be sufficient.

Thank you very much for your help!
0
 
Raymo12Author Commented:
Thanks!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now