Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete File from Server

Status
Not open for further replies.

Quasibobo

Programmer
Oct 11, 2001
168
NL
Hello,

It is getting anoying but I can't seem to delete a file of the server. This is de code I use:

Path = ServerPath & "\upload\"& Map & "\" & File
Set FSO = CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(Path) THEN
FSO.DeleteFile(""& Path & "")
Response.Write(""& Path & "")
Response.Write("File deleted")
END IF
Set FSO = Nothing

Can anybody tell me what is wrong?

Don't eat yellow snow!
 
Does the anonymous user have rights to delete files?
 
Yes,

I checked and the anonymous user has al rights...

More suggestions?

Don't eat yellow snow!
 
Hello Quasibobo,

Try this.
[tt]
Set FSO = [blue]Server.[/blue]CreateObject("Scripting.FileSystemObject")
[/tt]
If still no effect, response write the path for inspection.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top