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 <directory name here or blank for current> > <Name of file>
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 <command name>' is basically the unix equivalent to 'man' in DOS. Though far inferior.
I'm surprised I remember this stuff anymore. Wow.
