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!

FileSystemObject

Status
Not open for further replies.
Nov 16, 2002
24
US
I can't upload file with great uploading code and I can't even get a file from a folder within Here is my code for retrieving file:
<%
dim objfso, objfile
Set objfso = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objfile = objfso.GetFile(Server.MapPath(&quot;log.txt&quot;))
Response.Write &quot;log.txt was last modified&quot;
Response.Write objfile.DateLastModified
Set objfile = Nothing
Set objfso = Nothing
%>

Here is the error message:

Error Type:
Microsoft VBScript compilation (0x800A0408)
Invalid character
/liying/getfile.asp, line 7, column 3
Set objfso = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
--^


I'm wondering if my FileSystemObject wasn't installed correctly with IIS5.1 when I installed Windows XP. Any suggestions? I've been working on this for weeks! HELP PLEASE!
 
Hi asunpraise,
I would advis you to change your Server.Mappath(&quot;log.txt&quot;) to Server.Mappath(&quot;\foldername\log.txt&quot;).See if it works for you.
Regards
Tushar
 
Sorry, that didn't work.

My purpose is just to allow each individual to upload their files and be able to view them.

In fact, my upload code(suppose to work great) along with any page related to FileSystemObject(my guess), such as GetFile, ParentFolder, Files,etc wouldn't work. The pages will ALL get stuck there.

I went to Microsoft's site, Microsoft Windows Script 5.6(for Windows 2000) is the newest download for Scripting Runtime download, I've got Windows XP, which should comes with all those. Shall I install it anyway?

Any suggestions?

THANKS A MILLION! I have to turn in tomorrow to my professor. Real urgent, please help!!!!!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top