I'm using a basic FSO script to delete a folder on the web... but it's not working.
If I use this statement:
'Delete the file
if oDelete.FolderExists (server.mappath("\" & sold)) then
oDelete.DeleteFolder (server.mappath("\" & sold)), true
else
response.redirect ("page.asp")
end if
I get this error:
Microsoft VBScript runtime error '800a0046' Permission denied
And if I switch the file path to this:
'Delete the file
if oDelete.FolderExists ("E:\Inetpub\domain.com\" & sold) then
oDelete.DeleteFolder ("E:\Inetpub\domain.com\" & sold), true
else
response.redirect ("page.asp")
end if
I get this error:
Server object error 'ASP 0177 : 800a0046'
Server.CreateObject Failed
/solditem.asp, line 71
The operation completed successfully.
Is there a server permission that needs to be set to allow for deleting a file or folder? I've played around, and everything else works fine in FSO on this server... just not DELETE
On another site I run, I've used this same script and it works fine... I just asked the host to set up FSO permissions.
Very frustrating... any ideas?
(The server is IIS 5)