473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Jul 22 '05 #1
2 4117
Nevermind!
Got it.
myFSO.DeleteFile(Server.MapPath(myfile))
"Jake" <sp******@alltel.net> wrote in message
news:%2***************@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

Jul 22 '05 #2
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"
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: tvr | last post by:
Hi, I have a strange problem. I am not able to delete a published folder. Any ideas?? The files in the folder are not open, but it still says that "Please make sure files ...." I am...
4
by: SYR | last post by:
I'm using IIS 5.1 under win XP Pro SP1. I'm trying to delete a file using FileSystemObject Set fso = CreateObject("Scripting.FileSystemObject") fichier=server.MapPath("/photos/" & dir & "/" &...
1
by: Matt Hamilton | last post by:
I have a simple image gallery where I want to allow users to delete files. The problem I have is that after an image is displayed in the browser, I am not able to delete the file because "The...
6
by: I am Sam | last post by:
I keep getting this error and I don't know why: The path is too long after being fully qualified. Make sure path is less than 260 characters. Description: An unhandled exception occurred...
3
by: Phi | last post by:
Hi, I hope somebody could help me with this problem. I would like to make a form to add and delete records from my ms access database. I've found most of the codes from the internet and...
1
by: nasirmajor | last post by:
dear all, Please any urgent help regarding following code. i have the following code ================================================================= public void Delete(Object sender,...
3
by: Arpan | last post by:
A Form has a FileUpload, 2 Buttons & a TextBox web server controls. Using the FileUpload control, I want to give users the provision to move & delete files that DO NOT exist in C:\Inetpub\wwwroot...
0
by: Anjan Bhowmik | last post by:
Hi, I use a form to upload an image to a directory on my site (~/Images/UserName/file1.jpg). Using Server.mapPath function i get the Physical path and save the file using...
6
by: Ben | last post by:
Hi, i want to delete all excel files together in a specific directory. I tried this but the syntax is wrong: File.Delete(Server.MapPath("~/excel/" & "*.xls")) Can somebody tell me the right...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.