I decided I wanted a way to choose a printer that would send the output to a pdf without having to specify a filename. In a former job, I set up netcat (nc) to monitor a port, set that port up as a TCP/IP printer, and do whatever I wanted with the output. So I wrote a simple script:
:loop
ncat -vvv -l 8080>outfile.tmp
del outfile.pcl
ren outfile.tmp outfile.pcl
copy outfile.pcl c:\data\dropbox\pdffiles\%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,5%.pdf
goto :loop
It was working fine when I left on Friday. Unfortunately, microsoft decided sometime Friday night that ncat.exe was a virus and deleted it. I had gone through a bunch of hoops telling it not to delete it, but microsoft knows better.
So my system spent the weekend creating 400,000 zero byte files in my dropbox folder and shared them with all of my other machines.
</rant>
:loop
ncat -vvv -l 8080>outfile.tmp
del outfile.pcl
ren outfile.tmp outfile.pcl
copy outfile.pcl c:\data\dropbox\pdffiles\%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,5%.pdf
goto :loop
It was working fine when I left on Friday. Unfortunately, microsoft decided sometime Friday night that ncat.exe was a virus and deleted it. I had gone through a bunch of hoops telling it not to delete it, but microsoft knows better.
So my system spent the weekend creating 400,000 zero byte files in my dropbox folder and shared them with all of my other machines.
</rant>