Hi All... I'm trying to delete files from the server and its not working. Can any one help please?
It says the file doesn't exist... where as the file exists...
I did a response.write for my delFile to make sure its there but it doesn't see the file...
Thanks
A.
Dim fso
'Dim pathEnd...
Hi Tom... there is nothing much on that page... I was just testing it... however here is the entire code...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ISPR</title>
<meta...
tsuji.. I saw that and corrected it before testing... but still the same... doesn't go ahead and submit it.. it keeps giving me valid file msgbox... so I put a msgbox to see what its grabbing for docFile.. and its empty... so that means my statement docFile = Document.form1.blob.Value is not...
It not populating anything it the msgbox... so I'm guess its not picking up anything for docFile.
docFile = Document.form1.blob.Value
is not working... any ideas?
Hi tsuji... sorry I overlooked that man... stupid error... but even after I change it to "html" instead of ".html" it pops up the msgbox if file validity... I'm guessing its not getting docFile = Document.form1.blob.Value.... but I'll try to see if there is some other problem...
Hi thanks for the prompt posting... With this... it doesn't give the Ttpe mismatch error any more but it still doesn't submit anything... it just keeps giving me enter valid file msgbox... even if I have a .doc file. Any ideas?
Thanks
A.
Hi I am trying to validate the files that are being uploaded on my site. I want to let people submit only .doc or .html or .pdf.... I have this code written in VBScript but there are some problems with it.
1. It doesn't seem to work even if I attach a .doc..
it keeps giving me that I have to...
Hi tsuji...
Thanks a million man... I figured it out... for some reason.. after the path I put put -14 and it was not cutting the whole thing... (outputFile.asp) so I had to put more than 14 to fix the path... it works fine now... but I'm still surprised that its taking more than 14 letters...
oh BTW the outputFi... I think its getting it from the name of the asp page... (where this code exists). I named the file outputFile.asp... so its taking the first few letters from it.
Thanks again
A.
Hi tsuji...
this is the path i get when i do a response.write
c:\inetpub\wwwroot\admin\conferences\outputFi
which is wierd... coz the path should be something like...
c:\inetpub\wwwroot\admin\conferences\upload\and then whatever file was uploaded...
any ideas...
thanks..
A.
Thanks tsuji... you were not at all bothering with any elementary stuff infact I'm greatful to you for your patience... I tried all the possibilities and nothing worked... so I was thinking I have my basics wrong... anyways.. even when put the path like "\conferences\upload\" & filename... it...
Hi tsuji... thank you for the help... I tried to give it a physical path... "c:\abc\upload\&filename" and it still doesn't work. So I took out the part which is actually "Creating and Writing to a File" and it works fine... only problem is the physical file is not getting uploaded. I hope I'm...
I specify the path like this:
pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14
Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd)&"../conferences/upload/"&filename)
If you want to look at more code.. please look...
Hi... I can't use the actual filename as the file that is being uploaded is unknown... this page has a file uploading feature... people can upload any file they want... so can't really specify which file is being uploaded... any help?
Thanks...
A.
Hi I tried what you suggested... still no change when I try it with Netscape... when I used onsubmit instead of onclick it doesn't work on IE. So from just Netscape.. it became both IE and Netscape... very wierd... thanks for all the help...
A.
Here is the whole HTML page...
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%><%
// *** Restrict Access To Page: Grant or deny access to this page
var MM_authorizedUsers="";
var MM_authFailedURL="sorryauthor.asp";
var MM_grantAccess=false;
if (String(Session("MM_Username")) != "undefined") {
if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.