+ Post New Thread
Results 1 to 6 of 6
How do you do....it? Thread, delete a folder on startup via bat file windows 7 need some help please in Technical; hi people could someone give me the correct command that i can run as a startup script that will delete ...
  1. #1
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    951
    Thank Post
    185
    Thanked 137 Times in 97 Posts
    Rep Power
    35

    delete a folder on startup via bat file windows 7 need some help please

    hi people

    could someone give me the correct command that i can run as a startup script that will delete the following folder

    c:\windows\system32\spool\drivers\w32x86 folder

    the reason being we have introduced some mfds with papercut and at randowm points on random machines the printjobs are not being sent to papercut but they are just sitting on the machine.

    the only way to repair the fault is to delete the above folders contents and reboot.

    we are using the toshiba universal driver 2

    as i said it is random and i dont know if its a network connectivity issue at the moment as our switches are not the best in the world

    nothing in the event viewer to indicate that the correct driver is failing to load but what happens is a strange cut down version of the driver appears when staff send things to print.

    this only affects windows 7 at the moment but i need to get this sorted asap as i dont want the staff to loose faith in the new printing system

    i am looking at the power saving options of the machines to see if that is affecting thisngs in some way.

    i just cant remember the correct switches to do this as a batch file.

    Thanks in advance

  2. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,207
    Thank Post
    218
    Thanked 812 Times in 694 Posts
    Rep Power
    274
    im not sure you can while the spooler service is running

  3. Thanks to sted from:

    round2it (23rd April 2013)

  4. #3

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    12,962
    Thank Post
    586
    Thanked 1,493 Times in 1,339 Posts
    Rep Power
    397
    If the above is true then a batch file to do a
    net stop spooler
    del .......\filename
    net start spooler

    ???

    Ben

  5. 2 Thanks to plexer:

    mac_shinobi (23rd April 2013), round2it (23rd April 2013)

  6. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,212
    Thank Post
    2,766
    Thanked 935 Times in 875 Posts
    Rep Power
    343
    Code:
    net stop Spooler
    RD "c:\windows\system32\spool\drivers\w32x86" /S /Q
    net start Spooler
    Not tested the RD Command but going by the help that should delete the directory and any sub directories and not prompt to remove the directories or sub directories.

    Not sure if you need the quotes around the path but did that anyway, think it is only when there are spaces in the path that you need quote marks around the path
    Last edited by mac_shinobi; 23rd April 2013 at 01:44 PM.

  7. 2 Thanks to mac_shinobi:

    plexer (23rd April 2013), round2it (23rd April 2013)

  8. #5
    Chaddy's Avatar
    Join Date
    Nov 2012
    Location
    Orrell, Greater Manchester
    Posts
    34
    Thank Post
    8
    Thanked 3 Times in 2 Posts
    Rep Power
    3
    Something along these lines:

    net stop spooler
    rmdir /s /q "c:\windows\system32\spool\drivers\w32x86 folder"
    net start spooler

  9. 2 Thanks to Chaddy:

    mac_shinobi (23rd April 2013), round2it (23rd April 2013)

  10. #6
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    951
    Thank Post
    185
    Thanked 137 Times in 97 Posts
    Rep Power
    35
    Code:
    net stop Spooler
    RD "c:\windows\system32\spool\drivers\w32x86" /S /Q
    net start Spooler


    That's working great.

    Lets hope it fixes my problems.

    Thanks to all who helped.

    Rep given
    Last edited by round2it; 23rd April 2013 at 05:22 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. RM CC4 Network - How to run files on startup via registry policy
    By davida50000 in forum Network and Classroom Management
    Replies: 0
    Last Post: 20th November 2012, 02:22 PM
  2. Replies: 2
    Last Post: 24th September 2012, 09:20 AM
  3. [MS Office - 2007] VERY URGENT - Can Someone Make Me An XML File For Deployment Or Help Please!
    By pritchardavid in forum Office Software
    Replies: 19
    Last Post: 28th January 2010, 09:21 PM
  4. Empty files and folders on a shared area
    By ranj in forum Windows
    Replies: 6
    Last Post: 6th January 2009, 12:11 PM
  5. Replies: 6
    Last Post: 20th October 2005, 06:48 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
  •