A Command Line Copy Files to Printer Utility

Procon Construction Systems


File2PRN Console Mode File Printer is a Windows Terminal program designed to copy raw data files directly to a printer. (It is the Console mode equivalent of the Windows' utility WFil2PRN).

File2PRN is primarily for users who need to print text files, log files, and PCL files, etc.

File2PRN allows you to:-


File2PRN FileSpec(s) [PrinterName] [Switches]

  FileSpec    = the target File(s) - (can contain wildcards).
  PrinterName = the name Windows uses for the target printer.

Optional Switches:
  (Used as the last parameter)
   /N (or /NOFORMFEED)    = Do not add a FormFeed
   /F (or /FORCEFORMFEED) = Add FeedFeed even if already present
  (Single parameter switches)
   /D (or /DEFAULT)  = Show Default Printer
   /P (or /PRINTERS) = List Installed Printers
   /? (or /HELP)     = a basic HELP screen


File2PRN  20???.LOG
(Uses the Windows' default printer)

File2PRN  *.TXT "HP Color LaserJet 8550-PS"
(Names with embedded spaces must be "quoted")

File2PRN  File1.c;2ndFile.c "Brother HL-5340D"
(Filespec can contain multiple files)

File2PRN *.CPP "Canon LBP5360" /NOFORMFEED
(Do not add a FormFeed)

(Add a FormFeed even if there is one at the end of file)

File2PRN  /DEFAULT   (Show default printer name)
File2PRN  /PRINTERS  (List all installed printers)
File2PRN  /HELP      (Show a help screen)


File2PRN can accept up to THREE command line parameters:-

The FIRST parameter - the files to be printed

May be a single full path name or several pathnames separated by commas or semi-colons and may contain wildcards. It is usually a file specification. For example:-
  "F:\VS Projects\Utils\*.cpp"
  ""C:\LOGS\*.log, F:\Win Utils\*.txt""
(Pathnames with embedded spaces must be quoted.)

The other parameters - the Printer to be used and/or a switch are optional.

If a printer is specified, it must be one of the installed printers. Provide the full printer name - as listed in the Windows' Printers applet. These names usually contain embedded spaces, so the name must be enclosed in quotes to ensure the parameter is correctly passed.
For example, the parameter might look like:- "HP Color LaserJet 8550-PS"

If the parameter is not provided, the default printer is used.


This program uses several Windows' DLL files. If these are not present you will get an error message indicating which DLL is missing.

If this occurs, download the required DLLs from the links given in:-


Use this utility at your own risk! If you do not understand

you can only cause yourself grief!


File2PRN /Help
shows a help screen and program version number.

Download the latest version of File2PRN from Procon's Website.

Copyright 2009 - Procon Construction Systems
All Rights Reserved