Cancelling or deleting a job from the print queue takes ages in Windows. This is a common annoyance, which pretty much anyone who has ever used printers would be familiar with.
Apparently, this occurs because the temporary file created for the print job can’t be deleted while it is still being accessed by Windows. The solution is to manually kill the spoolsv.exe service using Task Manager and delete all job files present in C:\Windows\System32\spool\PRINTERS. Off course, if you need to continue printing you would have to either restart your computer or manually restart the spoolsv.exe service.
The trouble with this solution is that it demands too much work. However, a helpful Reddit user has created a batch file to automate the process. In order to use it you can download the batch file from here or manually copy the following code into Notepad and save it as file_name.bat.
echo Stopping print spooler.
net stop spooler
echo deleting stuff... where? I'm not sure. Just deleting stuff.
FOR %%A IN (%systemroot%\system32\spool\printers\*.*) DO DEL %%A
echo Starting print spooler.
net start spooler
Now, whenever you need to delete all printing jobs, just double click on the batch file. However, be careful while using this in a work environment as if you are on a print server, it would cancel printing jobs for all connected printers.
8 responses to “Instantly Cancel Any Printing Job With A Simple Batch File”
This was nice one to end the task.
Thanks for The Instant solution :p
.-= ChethanÂ´s last blog ..Zoozoo Jumping on Trampoline meets Tiger. sms GAME to 111[Vodafone ad] =-.
I liked this this code so much that I made an exe based app of this with some more features.. Gonna releae it on my blog soon. BTW post retweeted. 🙂
Oh good one! I will be making this a part of my usual batch files taht I use.
.-= MikeÂ´s last blog ..Send Email From A Batch File =-.
nice job to increase salary
Sometimes I can never some of the jobs to cancel, didn’t know in the past why this ws happening, but this batch file will come in handy!
Wow that is an awesome shortcut, thanks for the info, good thing I am not on a company network either.
This is indeed helping advice and definitely help to get rid off from such chagrin job. Thanks a lot for bringing such great solution.