Printing Directory Again

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
 
P

Paul R. Sadowski

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.
 
S

Sigs

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
 

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

Similar Threads


Top