Printer batch file

By rayhaley ·
I would like to place a batch file on a couple of networked machines enabling the people in my company to automatically clear all documents in a printer quene. Whenever a document errors out and backs up subsequent print jobs these people have no idea how to clear the jobs. They just move on to another machine.

A simple batch file with an icon on the desktop would work wonders!

Pentiun 4
Windows 2000
HP 2100tn laser printer

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Google Group Script (microsoft.public.windowsxp.general )

by Teaching Information Systems In reply to Printer batch file

I saw this in a google group post?

It stops the spooler, waits then deletes files.

@echo off
echo Purging the print queue . . .
net stop Spooler
echo Deleting all print jobs . . .
ping localhost -n 4 > nul
del /q %SystemRoot%\system32\spool\printers\*.*
net start Spooler
echo Done!
ping localhost -n 4 > nul

Collapse -

s-w-eeeet. that script is going in my toollbox

by sgt_shultz In reply to Google Group Script (mic ...
Collapse -

VBS script for purging printers on a server

by paul.cook In reply to Printer batch file

From "Hey, Scripting Guy" on MS Technet

Set objPrinter = GetObject("WinNT://PrintServer/Printer")

That's two lines, starting with Set and objPrinter. Sorry wasn't sure how this would format.

Now with this everyone is going to have to reprint their jobs.

Collapse -

educate the end user

by sakuhara In reply to VBS script for purging pr ...

you must teach them how to click the icon in the system tray and delete the jobs. otherwise you will need to teach them to click a bat file....which will get deleted in the next hour since the end users traditionally forget what the icon on the desktop is for and are now scared to click it. you must teach them to use what is built in

Collapse -

Not Quite Sakuhura

by rj In reply to educate the end user

They need to purge all print jobs directly from the spooler. There are times when a simple cancel or delete from the printer properties dialog, which you are talking about, does not work. In cases where this does not respond you have to go to a system level, which is what this guy needs from the batch file. Not to mention the batch file, if I understand correctly, would be on the printer server, not the users computer...

Related Discussions

Related Forums