Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to export list of all folders and sub-folders

Posted on 2013-11-11
7
Medium Priority
?
216 Views
Last Modified: 2013-12-30
What are my options to create an export file that shows all sub-folders under a top level folder?
0
Comment
Question by:iNetSystem
  • 4
  • 3
7 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 2000 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

WHERE:

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

Author Comment

by:iNetSystem
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.
0
 
LVL 96

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...
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:iNetSystem
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.
0
 

Author Comment

by:iNetSystem
ID: 39640624
Actually it seems to have worked.
0
 

Author Comment

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

Thanks!
0
 
LVL 96

Expert Comment

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

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

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
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…

971 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