Why does output redirection to LPT1 or shared printer not work in MSYS2 and OpenCOBOL?

46 Views Asked by At

How can I send output to a shared printer from MSYS2? I mapped a printer using

NET USE LPT1 \\home-pc\sysprint /persistent: yes

and I can use it from a command prompt:

dir >lpt1:

or a PowerShell prompt:

dir >\\tom-home-pc\sysprint

but neither of those work in MSYS2 nor in OpenCOBOL which uses MSYS2.

What am I missing?

I tried redirecting output to the device name (LPT1:) and the share name (\home-pc\sysprint)

I expected to get the output on the shared printer but LPT1: created a file called LPT1: and the share name did nothing.

0

There are 0 best solutions below