+ Post New Thread
Results 1 to 2 of 2
Windows Server 2000/2003 Thread, cmd or VBS to delete all folder contents with exception in Technical; Hi guys, need help to wright a script that will delete everything within a shared folder except one folder named ...
  1. #1

    Join Date
    Jun 2011
    Location
    Tashkent
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Question cmd or VBS to delete all folder contents with exception

    Hi guys,

    need help to wright a script that will delete everything within a shared folder except one folder named "cor"
    Thx

  2. #2


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Code:
     find /path/to/directory ! -name cor ! -wholename /path/to/directory | xargs rm -rf

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 29th January 2013, 10:16 AM
  2. Replies: 7
    Last Post: 12th November 2010, 04:28 PM
  3. VBS to remove Windows Firewall exception
    By simons2009 in forum Scripts
    Replies: 9
    Last Post: 3rd June 2009, 08:18 AM
  4. Covert CMD/BAT files to vbs help
    By tosca925 in forum Scripts
    Replies: 12
    Last Post: 8th November 2007, 02:58 PM
  5. Replies: 1
    Last Post: 21st January 2007, 02:51 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
  •