Export or print Directory Listing

G

Guest

Is there a way to print the directory listing to a file? Something like the
DOS command dir>prn or dir >filename. We're trying to clean up some shared
drives and need to maintain a list of directories and last update dates.
 
P

Pegasus \(MVP\)

cmw said:
Is there a way to print the directory listing to a file? Something like the
DOS command dir>prn or dir >filename. We're trying to clean up some shared
drives and need to maintain a list of directories and last update dates.

You've good the right idea:

dir /s "E:\Some Folder" > c:\files.txt
 
W

witan

You've good the right idea:

dir /s "E:\Some Folder" > c:\files.txt

(1) Is it not better to include the /a switch also? i..e,
dir /s /a "E:\Some Folder" > c:\files.txt
(2) Will the command
tree /f "E:\Some Folder" > c:\files.txt
work equally well?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top