Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   DOS command to... (http://www.greenguysboard.com/board/showthread.php?t=8397)

pf69.com 2004-06-16 11:56 AM

DOS command to...
 
does anybody know what id the DOS command to list all files from a dir?

I really need that

Surfn 2004-06-16 12:06 PM

/L

spacemanspiff 2004-06-16 01:39 PM

Been a while, but

dir

or

dir/p

to list a page at a time.

Cleo 2004-06-16 01:58 PM

Does DOS have man pages like *nix does?

pf69.com 2004-06-16 03:55 PM

its not just to list it is also to write on an .txt file

I know there is a way to do so but I dont rememeber how

DavidM 2004-06-16 04:02 PM

Quote:

Originally posted by pf69.com
its not just to list it is also to write on an .txt file

I know there is a way to do so but I dont rememeber how

Still not sure exactly what you want?

dir >

example:

dir C:\WINNT > C:\LOGS\FILELIST1.TXT

will redirect the output from the directory listing of C:\WINNT to the textfile C:\LOGS\FILELIST1.TXT

Is this what you want or do you want it prettied up or something?

edit: I guess I should add this... Doing the above will write over whatever existed previously in that file. If it does not exist, it will be created if possible.

If you want to append it (not overwrite) use '>>' in place of '>'.

Btw, if the header or summary bugs you, use 'dir /B', this will only list the files and directories without all the extra stuff in many DOS versions.

example:

dir /B >> LOG2.TXT

Also, for cleo, 'HELP ' is basically the unix equivalent to 'man' in DOS. Though far inferior.

I'm surprised I remember this stuff anymore. Wow. :)

DavidM 2004-06-16 04:23 PM

And.... lol

If you need to list only files and not use directories, try using the '/a-d' switch.

Example:

dir C:\ /a-d /b > C:\LOGS\FILELIST

This one I actually had to look up though I admit. ;)

pf69.com 2004-06-16 08:17 PM

thx for your help!

you have helped me a lot!


All times are GMT -4. The time now is 10:15 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc