Vprt: a euphoria based virtual printer port

version 2.3 created by Michael Raley created ? 2003
DOWNLOAD HERE
Purpose: Vprt2.exe provides a command line configured raw TCP print device for directing print jobs into files. It can run in batch termination mode or remain active to service additional print jobs. You can have multiple vprt instances actively listening for connections by specifying a different tcp port for each data channel. By default VPRT serializes filenames into the form [path and prefix][sequeunce number]_[month][day][extension] the sequence number is 4 digits with leading zero's. command line parameters VPRT2.EXE [Path and prefix] [extension] [TCP PORT] [OPTIONS] [optional post command] Path and prefix "C:\spooled\report" : the filename will start with "report" under spooled "\\MYSERVER\myshare$\report" : the UNC format for a windows share Extension : ".txt" or whatever you want. The files are always written in Binary mode. TCP PORT : Any available to bind to. 9100 is typical for HPJet direct. The Lantronix MSS100 serial device server uses 3001 OPTIONS: Stacked together in a delimited string. (run mode) END : on closing report VPRT exits with return code 0 NOEND : waits for next connection. increments sequence number for next report (File mode) APPEND : (explicit). append new info at end of file if rollon is not specified OVERWRITE: (implicit) replace the file if rollon is not specified (Serialization) ROLLON: if file ####_mmdd exists already, roll to the next available # STATIC: don't add serialization between the prefix and extension REUSE : (Implicit) if file #1 exists it will be overwritten or appended. (DISPLAY) SILENT: no standard output will be sent, thus no console window POPUP. (Events) POST: notifies VPRT that the following command line string contains a command to execute after a report file has been written. VPRT will wait for this command to complete. PRIOR: notifies VPRT that the following command line string contains a command to execute before a report file has been written. VPRT will not wait for this command to complete. Optional post print command String; Enclose the command string in double quotes. Use '!' to denote the file that was just created by VPRT as an arguement to a command. The command to execute can be an executable or batch file, but not a builtin DOS command like "echo". VPRT will wait for the command to complete before it processes the next connection. Redirection via pipes is not supported in the commmand string. Do this in a batch file instead. You can have spaces between the command line arguements but not spaces within those arguements (such as for a file path). The filename substitution charector ! also cannot resolve to a folder path with spaces. Even with double quoting you cannot execute with spaces in filenames. Place all this in a batch file instead. If the silent option is specified then console output will be suppressed after the command completes. examples: vprt2 "c:\spool\r" ".txt" "9105" "END-APPEND-SILENT" creates r0001_mmdd.txt or adds to it if the file was already present. Terminates when the report is done. VPRT2 "C:\SPOOL\" ".PRN" "9106" "noend & ROLLON" creates 0001_mmdd.prn unless it already exists, in which case it tries 0002, 0003, etc... then wait for the next report VPRT2 C:\SPOOL\MYFILE .TXT 9107 end-APPEND-static-SILENT create myfile.txt or keep adding to it. terminate when the report is done. VPRT2 "C:\spool\m" ".txt" "9100" "noend-rollon-post" "findstr fred !" creates file m0001_mmdd.txt or the next iteration, then looks for occurence of the word 'fred' in that. VPRT2 \\Myserver\myprinter\ .txt 9100 noend routes any print jobs, such as from an AIX queue to the designated Windows printer queue. These will be titled "Remote downlevel document" and owned by the user running the VPRT process. a cheap form of LPR.