/build/static/layout/Breadcrumb_cap_w.png

delete folder script

does anyone have script that will delete folder on the hd.... i'm using the below script...
but it gives me permission denied error... so is there way i can delete this ??? thanks


Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\Testme")

0 Comments   [ + ] Show comments

Answers (3)

Posted by: rpfenninger 18 years ago
Second Degree Green Belt
0
Is it really a folder underneath C:\ (root)? Could it be a permission problem? Normal users can't create/delete folders directly under C:\.
Otherwise, give me the exact location and name of the folder and I create a WiseScript (selfexecutable .exe file) for you which you could include in a .msi Custom Action.
Or what about deleting the folder through the RemoveFiles table?

Cheers

Roland
Posted by: Godfather 18 years ago
Senior Yellow Belt
0
how about trying this script ................

On Error Resume Next
Dim fso, s
Set fso = CreateObject("Scripting.FileSystemObject")
s="c:\test"
fso.deletefolder(s),True
Posted by: aa006 18 years ago
Senior Purple Belt
0
Thanks a lot everyone.... inside the folder there was sub folder which was causing the permssion problem, so delete all the folder using vbscirpt & rename the error ones to something else.. ....
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ