Re: List names of directories and subdirectories



On 31 Aug 2005 08:14:49 -0700, "Tobi" <tbeetz@xxxxxxxxx> wrote:

>
>I am looking for a simple tool to give me list that would look like if
>the first folder has 3 subfolders, the second one has 1 subfolder and
>the third folder has 2 subfolders ...
>
>
>Foldername1 Subfoldername1
>Foldername1 Subfoldername2
>Foldername1 Subfoldername3
>Foldername2 Subfoldername1
>Foldername3 Subfoldername1
>Foldername3 Subfoldername2

In the command prompt, type this:

dir /b /s /a:d

The /b says to provide just the file name, the /s says to go down
into subdirectories, and the /a:d says to list just directories, not
regular files.

The listing will start from your current directory when you're in
the command prompt, so use CD commands first as necessary. For
instance, if you want to list every directory on your disk then
begin with

cd \

You may want to capture your list to a file, such as c:\mylist.txt:

dir /b /s /a:d >c:\mylist.txt

(You won't see any output at the command prompt, but you can open
the file in Notepad or another editor. Depending on how many
directories you have, it could take a few minutes to write the
file.)


--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
"I was misinformed."
.



Relevant Pages

  • Re: moving multiple files from multiple subfolders up one level
    ... subfolders with probably 200 files in each and I don't want to do this ... Does anyone know of a way to do this in dos or using Win Explorer? ... I assume you want to do this in a Command Prompt. ... folder names, not forward slashes as in your example. ...
    (microsoft.public.windows.file_system)
  • Re: Printing the file directories in a folder
    ... Open a command prompt in the directory you want to print and type: ... > In older version fo Windows, it was possible to print the ... > subfolders, floppy drives, etc. ...
    (microsoft.public.windowsxp.general)
  • Re: Print folders
    ... How can I create a .txt file or print a list of all the subfolders within a ... Go to a command prompt and type DIR /? ... you want the format to look: ...
    (microsoft.public.windowsxp.general)
  • Re: How to copy whole folders?
    ... When copying full folders (with subfolders) from one harddrive into ... Use xcopy.exe from the Command Prompt. ...
    (microsoft.public.windows.file_system)
  • List names of directories and subdirectories
    ... the first folder has 3 subfolders, the second one has 1 subfolder and ... the third folder has 2 subfolders ... ... Prev by Date: ...
    (microsoft.public.windowsxp.general)