Just copy the code into a notepad document and save it out as a bat file. Usually "fixprinter.bat"

net stop spooler

del C:\windows\system32\spool\printers\*.* /q

net start spooler

Right click the .bat file and run as administrator.