List of all files on a HD?

open a command prompt. change to the drive you want eg

d:

type

cd\

that will take you back to the root of the drive

now type

dir *.* /s > dir.txt

now the complete file list will be in a text file at the root of the drive. look at "dir /?" for more options.
 
you shouldn't see anything on screen so you must have copied it wrong. :p

the "> blah.txt" bit is to stop any output from showing on screen and instead writes to file.
 
dir \*.* /a /s > \dir.txt

That will list all files, including hidden ones, to a text file called dir in the root directory of the drive you run it from. :)
 
Instead of using the dir command you might want to use the tree command, in particular if you use the /a and /f arguments. Piping it out to a text file, of course.

This should work (not on a Windows box so can't test it)...

C:> tree /a /f >c:\listing.txt
 
tree makes it look nice and you can visually see the file structure...

The output should look something like this:

command_12.gif


That screenshot didn't use the /f parameter, so it's just showing the directories, but if you include the /f when you call the command then it also includes each file within the individual folders in the output too.
 
does work

open cmd, type.. "cd.." keep doing that until it's back at c:

then type

tree /a /f >c:\list.txt

takes a while

also you can use

dir /s /b >c:\files2.txt
 
Back
Top Bottom