I’m in a situation where right now a text list of all the subdirectories in a single directory need to be written as a text file. is there any way i can have windows do this for me or am i going to have to manually type the names of 150+ directores to text?
From a command prompt:
cd c:\somefolder
dir /ad /b > dirlist.txt
will give a list of just the subfolder names from the folder somefolder into the file dirlist.txt
having a bit of trouble with the command line, i cant get it to change drives as the directories are on the f drive… the command should be cd f:\ correct? when i type this and f prompt pops up but the changes to a c prompt…
No, to get to the other drive you just type the drive letter, so it would be:
C:>f:
…and then do F:>cd dirname to get to the next directory down and so forth. Or you could just type in the full path if that’s easier.
In the command line type
f:
your prompt should now be something like F:>
You can also use *cd /d f:* or *pushd f:* to change directories and drives at the same time.
Or just put all the paths in one command like this:
dir f:\ /ad /b > c:\dirlist.txt.