FSO.DeleteFolder Permission Error

I have a script which can create a folder and add a file into this folder, this works fine. But i need to have another script to reverse this, ie delete this folder and the file inside.

I have used the FSO.DeleteFolder(Server.MapPath(MyFolder), True) to remove the folder, (and as i understand all files in the folder) however, i get a "Permission Denied" error. Presumably i need to give access rights to the script so it can delete folders. How can this be done?

LVL 3
OblivionSYAsked:
Who is Participating?
 
SlimshaneeyConnect With a Mentor Commented:
Im not certain, but I dont think so...
0
 
SlimshaneeyCommented:
In the parent folder, you need to give IUSR_machinename rights over all files and folders in that direxctory. You should then be able to delete...
0
 
OblivionSYAuthor Commented:
How does one go about doing that? It will need to work from multiple machines too.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
SlimshaneeyCommented:
On the machine it self, go to the parent folder. Right click it, select properties, then Security, there is a list of users. You will need then to add IUSR_whetverthenameofyourmachineis to that list and give all nescessary rights to that folder and its contents,
0
 
OblivionSYAuthor Commented:
Ahhh, one thing i should have said is, i dont host the pages, they are on a webserver somewhere. So i cannot access that information.

Is there any way for the dynamically created folders to be dynamically deleted?

 When the folder is created, is there anyway to set the permissions then that anyone can delete it?
0
 
NandhiniCommented:
you may get that error if the resource used by the file is not destroyed properly
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.