Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   delete file - Server.MapPath problem (http://www.velocityreviews.com/forums/t797998-delete-file-server-mappath-problem.html)

Jake 02-21-2005 06:45 PM

delete file - Server.MapPath problem
 
What's wrong with this code? Thie file is there, why cant it find it?

Thanks in advance!

<%
myfile = request.querystring("filename")
response write myfile
myFSO.DeleteFile(Server.MapPath(" & myfile & "))
SET myFSO = NOTHING
%>

OUTPUT:
data/000000/index.htm

Microsoft VBScript runtime error '800a0035'

File not found

/deletefile.asp, line 9




Jake 02-21-2005 06:52 PM

Re: delete file - Server.MapPath problem
 
Nevermind!
Got it.
myFSO.DeleteFile(Server.MapPath(myfile))


"Jake" <spamthis@alltel.net> wrote in message
news:%23xqjFWEGFHA.628@TK2MSFTNGP15.phx.gbl...
> What's wrong with this code? Thie file is there, why cant it find it?
>
> Thanks in advance!
>
> <%
> myfile = request.querystring("filename")
> response write myfile
> myFSO.DeleteFile(Server.MapPath(" & myfile & "))
> SET myFSO = NOTHING
> %>
>
> OUTPUT:
> data/000000/index.htm
>
> Microsoft VBScript runtime error '800a0035'
>
> File not found
>
> /deletefile.asp, line 9
>
>
>




Bob Barrows [MVP] 02-21-2005 06:56 PM

Re: delete file - Server.MapPath problem
 
Jake wrote:
> What's wrong with this code? Thie file is there, why cant it find it?
>
> Thanks in advance!
>
> <%
> myfile = request.querystring("filename")
> response write myfile
> myFSO.DeleteFile(Server.MapPath(" & myfile & "))
> SET myFSO = NOTHING
> %>
>
> OUTPUT:
> data/000000/index.htm
>
> Microsoft VBScript runtime error '800a0035'
>
> File not found
>
> /deletefile.asp, line 9

As a guess, I would say permissions. I suspect your IUSR account lacks
permissions to brows the folder
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"




All times are GMT. The time now is 02:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.