+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, search and remove in Coding and Web Development; hi, im after a simple script to search through my file server and remove a folder that is in all ...
  1. #1

    Join Date
    Aug 2012
    Posts
    31
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    4

    search and remove

    hi,

    im after a simple script to search through my file server and remove a folder that is in all users home drives, i know how to delete etc but im after something that i can just say look for this folder on my d: and remove.

    thanks

  2. #2

    Join Date
    Aug 2012
    Posts
    31
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    4
    its ok i fixed my vbs and all works

    ShowFolderList("C:\test")

    Function ShowFolderList(folderspec)
    on error resume next
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set folder = fso.GetFolder(folderspec)
    Set subfolder = folder.SubFolders
    For Each filefolder in subfolder
    ShowFolderList(filefolder.path)
    if filefolder.name = "PepperFlash" then
    fso.deletefolder filefolder.path, true
    End if
    Next
    End Function

    wscript.echo "Done."

SHARE:
+ Post New Thread

Similar Threads

  1. My searches, and adverts
    By techtopia in forum Internet Related/Filtering/Firewall
    Replies: 3
    Last Post: 23rd July 2010, 09:58 AM
  2. Replies: 1
    Last Post: 17th June 2008, 12:41 PM
  3. Replies: 0
    Last Post: 17th April 2007, 09:38 AM
  4. Moving Users to a New Group and Removing them from the old
    By ninjabeaver in forum How do you do....it?
    Replies: 5
    Last Post: 6th December 2006, 11:48 AM
  5. Mass search and replace
    By Fletcher_Bravo in forum Windows
    Replies: 2
    Last Post: 5th July 2006, 03:44 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
  •