+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Simple script to delete everything from a share in Coding and Web Development; I need a script that will delete every file & folders from a network share. We have a networked photocopier ...
  1. #1
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,049
    Thank Post
    147
    Thanked 98 Times in 78 Posts
    Rep Power
    33

    Simple script to delete everything from a share

    I need a script that will delete every file & folders from a network share.

    We have a networked photocopier that also doubles up as a scanner and scans documents to a network share. I want to run a script everyweekend that will delete the contents of that share so that its empty again Monday morning.

    Its located in \\server\scans

    Can be VBS or BAT - anything that i can run as a scheduled task on my server.

    Thanks

    -Ben

  2. #2
    dwhyte85's Avatar
    Join Date
    Mar 2009
    Location
    Berkshire
    Posts
    1,219
    Thank Post
    159
    Thanked 147 Times in 132 Posts
    Rep Power
    103
    Command is:

    del /s /q /f \\path\to


    \\path\to could be c:\path\to as well

    so...


    providing you have perms to do it, easy peasy hooray.


    Apologies, did not realise folder deletion was required - assumed all within one dir - sorry!
    Last edited by dwhyte85; 19th March 2009 at 02:37 PM.

  3. Thanks to dwhyte85 from:

    jamin100 (19th March 2009)

  4. #3
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,049
    Thank Post
    147
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    doesnt delete folders though.

  5. #4

    JJonas's Avatar
    Join Date
    Jan 2008
    Location
    North Walsham, Norfolk
    Posts
    3,115
    Thank Post
    389
    Thanked 438 Times in 326 Posts
    Rep Power
    384
    have you tried deltree?

  6. Thanks to JJonas from:

    jamin100 (19th March 2009)

  7. #5
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,049
    Thank Post
    147
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    ta . . . .

SHARE:
+ Post New Thread

Similar Threads

  1. Script to Delete Profiles - PLEASE HELP
    By Mr_M_Cox in forum Scripts
    Replies: 13
    Last Post: 22nd February 2013, 03:53 PM
  2. VB script to delete certain folders
    By PTD in forum Scripts
    Replies: 7
    Last Post: 4th June 2008, 12:30 PM
  3. Script to delete certain folders
    By Pumaedition in forum Scripts
    Replies: 4
    Last Post: 22nd April 2008, 10:08 PM
  4. Simple PHP script for notes about students?
    By ChrisS in forum Scripts
    Replies: 1
    Last Post: 29th November 2007, 10:25 AM
  5. need a script to delete shortcuts
    By philtomo-25 in forum Scripts
    Replies: 2
    Last Post: 1st November 2007, 03:50 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
  •