PRINT        Print a file

Top  Previous  Next

Syntax:

PRINT

[ file name ]  [ ptr name ]

Arguments:

[ file name ]

Variable or string defining a file or path name; if no path is defined FileLinks working folder is used.

 

[ ptr name ]

Variable or string defining the destination printer (e.g., HP LaserJet 4).

Options:

None

 

 

 

This command sends the specified file to a printer. Printing files other than text files is not recommended. Script file execution resumes when the file has been completely accepted by Print Manager.

 

The [ ptr name] used in the PRINT command is different depending on whether the target printer is locally attached or attached via a network.

 

To determine the [ ptr name ] of a local printer on Windows XP, double click on Start | Control Panel | Printers and Faxes. You will see a display similar to the following:

 

printers

 

This shows two printers by the names of HP LaserJet4 and HP LaserJet 4000 available to your system. HP LaserJet4 is a local printer (and the current default printer designated by the check mark) and HP LaserJet 4000 is a shared (i.e., network) printer (designated by the “wire node” printer icon).

 

The PRINT command is shown below prints to the local printer:

 

       PRINT "myfile" "HP LaserJet 4"

 

Determining the [ ptr name ] of a shared network printer is more complicated. With shared printers, the name is a combination of the hosting computer, and the printer name and is in the form \\<hosting computer>\<printer name>.

 

Under Windows XP, for example, double click on Start | Control Panel | Printers and Faxes, then right click on the shared HP LaserJet 4000 printer and select Properties, and finally click the Sharing tab. You will see something like the following:

 

net_printer_2000

 

The [ ptr name ] to use is a combination of the computer name where the printer is physically attached (i.e., CHAMPLIN) and the name of the printer shown in the Share Name field. In this case the corresponding command to print to a shared printer would be:

 

       PRINT "myfile" "\\CHAMPLIN\HPLaserJ"

 

Related Command(s): WORKINGDIR