How to select specific filenames nested within several folders?

Windows 7: copy or output folder, subfolder and filenames as text?

  • 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.

  • 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 /?

resurrexit at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

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. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tree.mspx?mfr=true

theDrizzle

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...

resurrexit

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.