bshingler Posted February 5, 2013 Posted February 5, 2013 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
bshingler Posted February 5, 2013 Author Posted February 5, 2013 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."
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now