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 01:39 PM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57