Jump to content

Recommended Posts

Posted

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

Posted

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."

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...