Dear all,
I have a script that creates a FileSystemObject to be used for
folder/directory manipulation. What I am trying to do is to search the
drive if folder exist. If it doesn't it creates a new folder, but if
the folder exists it deletes the old folder and creates a new one. The
error refers to the line where I am deleting the folder. Here is my
code:
zip_path = "C:\cd_build"
If fso.FolderExists (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolder (zip_path & "\to_Zip" )
fso.CreateFolder (zip_path & "\to_Zip" )
else
fso.CreateFolder (zip_path & "\to_Zip" )
end if
And this is the error I am getting:
Microsoft VBScript runtime error '800a0046'
Permission denied
I have all the rights (full control) to the folder.
If I am trying to delete the folder in the Windows Explorer it gives
me and error for Sharing Violation. This foder is not used by any
other program, open anywhere else or anything.
I have no idea what is going on!!
Please somebody help me.
Thanks
Katja