- Client: Windows XP
- Print Server: Ubuntu via CUPS
Is there a way to query the printer queue on the server from a client to retrieve the name of the file being printed?
Code example would be something like:
FOR /F "tokens=* USEBACKQ" %%F IN (`COMMAND TO QUERY PRINT JOBS ^| FIND "FILENAME"`) DO ( SET var=%%F ) IF NOT DEFINED var ( ECHO Print Job Does Not Exist ) ELSE ( ECHO Print Job Completed )