+ Post New Thread
Results 1 to 3 of 3
Windows Server 2000/2003 Thread, Auto delete old jobs from print queue in Technical; Hi, I'm having a problem managing my print queues and disk space and wonder if anyone here knows of a ...
  1. #1

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,691
    Thank Post
    852
    Thanked 899 Times in 744 Posts
    Blog Entries
    9
    Rep Power
    329

    Auto delete old jobs from print queue

    Hi,

    I'm having a problem managing my print queues and disk space and wonder if anyone here knows of a program or script that'll automate the whole process. Something I can set to run at the end of every day and will automatically delete any job older than 7 days from all the printers on the server?

    Cheers

    Terry.

  2. #2

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,691
    Thank Post
    852
    Thanked 899 Times in 744 Posts
    Blog Entries
    9
    Rep Power
    329
    I declare myself a script-kiddy genius

    Code:
    @echo off
    net stop pcprintprovider
    net stop spooler
    forfiles /p c:\windows\system32\spool\printers /d -7 /c "cmd /c del @files /q /f"
    net start spooler
    net start pcprintprovider
    job done

  3. #3

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,785
    Thank Post
    3,291
    Thanked 1,054 Times in 975 Posts
    Rep Power
    365
    Code:
    echo Step 1: Stop the Print Spooler
    echo ------------------------------
    net stop spooler
    net stop pcprintprovider
    echo Services have been stopped.
    
    echo Step 2: Erasing old print jobs
    echo -------------------------------------------------
    del /Q /F /S "%systemroot%\System32\Spool\Printers\*.*"
    echo Deleted Old Print Jobs - Done!
    
    
    echo Step 3: Problems eliminated! Restarting printer services
    echo --------------------------------------------------------
    net start spooler
    net start pcprintprovider
    echo Services has been restarted!
    echo.
    
    echo Step 4: Try printing again.
    pause
    I have the above obviously just added in your extra servce for pcprintprovider

SHARE:
+ Post New Thread

Similar Threads

  1. Password protected print queue
    By meastaugh1 in forum How do you do....it?
    Replies: 5
    Last Post: 11th June 2009, 11:51 AM
  2. Replies: 0
    Last Post: 1st October 2008, 10:41 AM
  3. Weird print queue issue
    By HodgeHi in forum Windows
    Replies: 2
    Last Post: 30th September 2008, 03:49 PM
  4. Replies: 14
    Last Post: 25th January 2008, 08:31 PM
  5. Replies: 9
    Last Post: 26th February 2007, 12:45 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •