Results 1 to 2 of 2

Thread: print to file

  1. #1
    Guest

    Default print to file

    I am using a dos application across a network. When I require a printout I use NET USE commands to print to a network printer eg NET USE lpt1: \\server\printername, which works fine. However occasionaly, I wish to print to FILE. How do I print to file. Is there a net use command our other that enables me to do this?

  2. #2
    Guest

    Default Re: print to file


    I seem to remember (though I haven't done it for a long time) that the DOS spooler 'print' command will accept redirection. Just do 'print thefile.ext > myfile.txt'. Do *not* call it 'prn.txt' or 'lpt.txt'. DOS has the endearing trick by which it actually writes to the *device* whose name you have started a filename with. So avoid con, aux, com, lpt, prn, nul. (there is one other --- can't think of it).

    You might also be able to do 'print thefile.ext > \\server\path\myfile.txt'.

Similar Threads

  1. Print a PDF file
    By DavidW in forum PressF1
    Replies: 8
    Last Post: 07-03-2006, 07:24 AM
  2. Print to File
    By zqwerty in forum PressF1
    Replies: 2
    Last Post: 18-04-2005, 04:14 PM
  3. Print to File?
    By in forum PressF1
    Replies: 1
    Last Post: 31-05-2002, 06:37 PM
  4. Print to File?
    By in forum PressF1
    Replies: 0
    Last Post: 31-05-2002, 02:55 PM
  5. Print to File?
    By in forum PressF1
    Replies: 0
    Last Post: 31-05-2002, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •