Clear Print Queue via Batch Script

Had a client whose print queue would jam up and they couldn’t restart the printer spooler until you manually cleared the spooled documents. So I stole this piece of code and put it in a batch file. Works wonders!

@echo off
net stop "print spooler"
del /q "%SystemRoot%system32spoolPRINTERS*.*"
net start "print spooler"

Update: The reason the spooler was dying was because when he printed a PDF document he would close Acrobat before the document finished and in turned killed the Print Spooler. Because we charge by the hour, he didn’t want it to be investigated any further, which is fine by me!