Solved

How to export file and folder structure to excel spreadsheet

Posted on 2010-09-07
7
1,346 Views
Last Modified: 2013-11-10
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
Comment
Question by:Raymo12
  • 4
  • 2
7 Comments
 
LVL 51

Expert Comment

by:Bill Prew
ID: 33623179
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
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 33623389
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
 

Author Comment

by:Raymo12
ID: 33629480
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Raymo12
ID: 33630774
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
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 33630846
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
 

Author Comment

by:Raymo12
ID: 33631030
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
 

Author Closing Comment

by:Raymo12
ID: 33631576
Thanks!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now