Windows 7: copy or output folder, subfolder and filenames as text?
October 27, 2013 6:03 PM   Subscribe

I have a large folder containing dozens of folders, each of which contain multiple subfolders, each of which in turn contain several files; folders, subfolders and files all have unique names. In Windows 7 I can expand all the folders to view the folders, subfolders and files; what I need is a copy-able version of that nested organization of data that I can "paste" or otherwise output into Word or even notepad. Possible?

I have seen tips for automating this with the contents of one folder by way of the command prompt, and can only get it to output one folder at a time; but I need to do this with many folders and get an output that includes all folders, subfolders and filenames.

Possible or not possible? If it's possible, can I copy/output it so it's bulleted or in outline view to preserve something of the meticulous organization of the folders and content? If it helps, the files are all on a thumb drive.
posted by resurrexit to Computers & Internet (3 answers total) 5 users marked this as a favorite
 
Best answer: From the command line, does:
dir /b /s
get you what you want? The "/b" limits the formatting to just directory/file names. The "/s" makes it look in all the subfolders, too.

If that's right, then you could send that output directly to a text file:
dir /b /s > list.txt

If you want the list saved elsewhere (rather than the directory you're starting in), do:
dir /b /s > c:\list_folder\list.txt

If this isn't quite right, to see other options with the dir command, do:
dir /?
posted by inigo2 at 6:20 PM on October 27, 2013 [1 favorite]


Best answer: you're looking for the "tree" command line utility -- probably use something like "tree /F /A" at the top folder level from the command prompt.

Microsoft documentation on tree
posted by theDrizzle at 6:20 PM on October 27, 2013 [1 favorite]


Response by poster: Nice work, folks!

E:\>tree /f /a > e:\folders.doc

Got me where I needed to be. Now for some fun with "replace all" formatting in Word...
posted by resurrexit at 7:15 PM on October 27, 2013


« Older How does a 20 yr old healthyish student get back...   |   Can you name these two films? Newer »
This thread is closed to new comments.