English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

batch job. howto write all directory paths on a computer to one text file. not just dir ... > textfile.txt I am looking for a code snip that will record all of the directories to one file. in the windows environment

2007-04-23 14:54:18 · 5 answers · asked by Netiad 2 in Computers & Internet Programming & Design

5 answers

From your other questions, I'm guessing that you want a full listing of all the sub-directories so that you use them in another search. If that's true, then you will want to get a "bare" listing of your directories - that's without all the extra information like the creation date, timestamp, etc. You will also want to make sure to _just_ get directories, and not filenames.

Here's how you do that,

dir \ /s /b /ad > textfile.txt

"\" = start from the root directory
"/s" = get all subdirectories
"/b" = bare information, just names
"/ad" = just get directories

2007-04-25 12:32:35 · answer #1 · answered by Kevin 7 · 5 0

2

2016-07-23 07:54:58 · answer #2 · answered by Warren 3 · 0 0

to maintain it straight forward, i could advise to discover the archives that already comprise the text fabric in a given direction, then circulate them to a temp itemizing and execute the command you already understand on the relax archives (this could circumvent having the text fabric appended two times). very final step, return the archives from the temp dir to the unique dir.

2016-10-03 11:34:33 · answer #3 · answered by schiraldi 4 · 0 0

Take Surveys Get Paid : http://OnlineSurveys.uzaev.com/?SGcL

2016-07-10 03:18:06 · answer #4 · answered by Colby 3 · 0 0

use the /s flag :

cd \
dir /s * > file.txt

or in batch :
@ECHO OFF
dir /s "%*"* > file.txt

2007-04-23 15:14:03 · answer #5 · answered by dave_h4 2 · 0 0

fedest.com, questions and answers