Need to export list of all folders and sub-folders

Posted on 2013-11-11
Last Modified: 2013-12-30
What are my options to create an export file that shows all sub-folders under a top level folder?
Question by:iNetSystem
  • 4
  • 3
LVL 95

Accepted Solution

Lee W, MVP earned 500 total points
ID: 39640589
If I understand what you're asking for, open a command prompt and type:

dir /ad /b /s x:\ > file.txt


X:\ is the root of the drive you want (C:, D:, etc)
file.txt is the name of the text file you want to use to save this export.

Author Comment

ID: 39640592
Hi -

Let's assume the D volume on a server has a folder named IT.  I would like to export to a text file but a CSV is preferred all folders and sub-folders under the IT folder.  I don't care to list any files, I only need to see the folder structure.
LVL 95

Expert Comment

by:Lee W, MVP
ID: 39640604
Did you try the command I suggested?  What part are you having difficulty with... perhaps I could clarify...
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.


Author Comment

ID: 39640618
I did try that but it is not getting below the first level of sub-folders.  for each sub folder there can be several levels below that.

Author Comment

ID: 39640624
Actually it seems to have worked.

Author Comment

ID: 39640629
the order of the folders seems to be random - it's not everything I wanted but will work.

LVL 95

Expert Comment

by:Lee W, MVP
ID: 39640673
Change the order - add /o

dir /ad /b /s /o x:\ > file.txt

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Redirected folders in a windows domain can be quite useful for a number of reasons, one of them being that with redirected application data, you can give users more seamless experience when logging into different workstations.  For example, if a use…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

920 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

15 Experts available now in Live!

Get 1:1 Help Now