how to print (using printer) a file using MS-DOS command? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to print (using printer) a file using MS-DOS command?

microBOYmicroBOY Posts: 64Member
is there any command that can print out a text-based file thru' printer?

Comments

  • blipblip Posts: 756Member
    At DOS prompt:
    copy filename.ext prn

    Or in ASM:
    http://members.tripod.com/~oldboard/assembly/file_handles.html
  • devo_bxxpdevo_bxxp Posts: 1Member
    Alternative: Use "lpr"?
    Isn't .prn the extension for spooled documents?

    : At DOS prompt:
    : copy filename.ext prn
    :
    : Or in ASM:
    : http://members.tripod.com/~oldboard/assembly/file_handles.html
    :

  • microBOYmicroBOY Posts: 64Member
    how to use the 'lpr' command? eg, i wish to print a file ( file.ext ).
    is it " copy file.ext lpr" ?

    another question, when we should use 'prn' and what's the difference between 'prn' and 'lpr'?
    : Alternative: Use "lpr"?
    : Isn't .prn the extension for spooled documents?
    :
    : : At DOS prompt:
    : : copy filename.ext prn
    : :
    : : Or in ASM:
    : : http://members.tripod.com/~oldboard/assembly/file_handles.html
    : :
    :
  • blipblip Posts: 756Member
    I wasn't using ".PRN", but instead "PRN".
  • mercman2000mercman2000 Posts: 80Member
    type filename.ext >> LPTx

    where x is the LPT port, like 1 or 2.

    Wraps to 80 characters, I think.

    Don't get mixed up thinking

    echo filename.ext >> LPTx

    will do it. You'll get a page that just has filename.ext in the top left hand corner, and all the people around you will start laughing uncontrollably at your stupidity, you, who are held as a DOS god in their eyes. I speak from experience. :P

    filename.ext is of course your file name. and >> is redirection, if you were curious. >> for append, > for overwrite. >> is my favorite. i'm just goofy like that.

    ---------------------------------------------
    I've got a plan, but I'm going to need a dead monkey, some empty liquor bottles, and a vacuum cleaner.

  • BitdogBitdog Posts: 528Member
    The local zoo,
    Behind Sams bar & grill,
    & Thrifty stores,

    What's yer plan ?

    It sounds like my last plan, try full liquor bottles instead.
    Bitdog



    : ---------------------------------------------
    : I've got a plan, but I'm going to need a dead monkey, some empty liquor bottles, and a vacuum cleaner.
    :
    :

Sign In or Register to comment.