Here's an update to PCLPRINT.BAT, for PCL printing, and a variant of
it, vDosPrint.bat, for other printing. For myself, I've assigned
vDosPrint.bat to LPT1 and PCLPRINT.BAT to LPT2. I tried to devise a
single batch file to cover both, but no joy so far.
# config.txt
LPT1 = start.exe /hid vDosPrint.bat
LPT2 = start.exe /hid PCLPRINT.BAT #LPT2.asc
:: vDosPrint.bat [rev.CLD 9/14/16]
@echo off
if exist %TEMP%\vdlprn-*.pdf del/q %TEMP%\vdlprn-*.pdf >nul 2>nul
cd/d %~dp0
for /f "tokens=2-7 delims=,-./: " %%t in ("%DATE%%TIME%%RANDOM%") do
set tempfn=%TEMP%\vdlprn-%%t%%u%%v%%w%%x%%y.pdf
copy/y #LPT1.pdf %tempfn% >nul 2>nul
start.exe /hid %tempfn%
set tempfn=
goto :eof
:: PCLPRINT.BAT [CLD rev.9/14/16]
@echo off
if exist %TEMP%\vdlprn-*.pdf del/q %TEMP%\vdlprn-*.pdf >nul 2>nul
cd/d %~dp0
if exist PCLPRINT.PDF del/q PCLPRINT.PDF
start.exe /hid pcl6.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=PCLPRINT.PDF "%1"
timeout /t 2 /nobreak >nul
for /f "tokens=2-7 delims=,-./: " %%t in ("%DATE%%TIME%%RANDOM%") do
set tempfn=%TEMP%\vdlprn-%%t%%u%%v%%w%%x%%y.pdf
copy/y PCLPRINT.PDF %tempfn% >nul 2>nul
start.exe /hid %tempfn%
set tempfn=
goto :eof
--
Carl Distefano
cld@xxxxxxxx