Printing Directory Again

  • Thread starter Thread starter Abigail
  • Start date Start date
A

Abigail

Hi,

I've got my directory up on the screen now but how do I
write it to a text file so I can print?

Thanks
 
Abigail said:
Hi,

I've got my directory up on the screen now but how do I
write it to a text file so I can print?

You can redirect the output of the command to a file using the > operator.

If your command line is dir \\computer\share\*.ext then youd add the
redirection symbol and a filename at the end of the command like this:

dir "\\computer\share\*.ext" > c:\dirlist.txt

To add more text to that same file use >>

dir "\\computer\share\*.ext" >> c:\dirlist.txt

A single > will rewrite the file each time it is used. Double >> will append
any text to the file.
 
You can also bypass sending to a text file if you wanted and go directly to
the printer:

dir \\computername\share\*.ext >\\print_server\printer_name
 
Back
Top