Re: problem using FileSystemObject
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 08/25/04
- Next message: Aaron [SQL Server MVP]: "Re: (OT?) HTML Question"
- Previous message: James Baker: "Re: (OT?) HTML Question"
- In reply to: gadya: "problem using FileSystemObject"
- Next in thread: gadya: "Re: problem using FileSystemObject"
- Reply: gadya: "Re: problem using FileSystemObject"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Aug 2004 09:48:28 -0400
-- http://www.aspfaq.com/ (Reverse address to reply.) "gadya" <gadya@discussions.microsoft.com> wrote in message news:9F751265-4FAE-4416-B574-10D875AC3775@microsoft.com... > I am learning to use ASP on IIS 6 under Windows XP. > When I came to the FileSystemObject I found IIS hangs on OpenTextFile. > (no problem when scripting on the Client!) > I couldn't find anything on Technet. > > I find that I can use folderExists > but not getFolder > > I can use GetFileName > but not GetFile > and not OpenTextFile > > (I've tried using Fat32 and NTFS and different drive letters but to no avail. > I've turned off Norton antivirus and set my IE security settings to Low.) > > I'm using the Script Debugger and executing one command at a time and it > hangs consistently on binding to a file. > I then have to reboot my PC in order to be able to use IIS. > ------------------------ > > This works: > <SCRIPT LANGUAGE=VBScript RUNAT=Server> > Stop > Set fso = Server.CreateObject("Scripting.FileSystemObject") > If fso.FolderExists("H:\Downloads") then > Response.Write("<br>There is a folder named \Downloads") > End if > > fln = fso.GetFileName("H:\Downloads\test.txt") > Response.Write(fln & "<br>") > > </SCRIPT> > > (The Stop is to activate the Debugger) > --------------------------------------- > > These don't work > <SCRIPT LANGUAGE=VBScript RUNAT=Server> > Stop > Set fso = Server.CreateObject("Scripting.FileSystemObject") > If fso.FolderExists("H:\Downloads") then > Response.Write("<br>There is a folder named \Downloads") > set objFolder = fso.getFolder ("H:\Downloads") > ' fails here > Response.Write("<br>Have bound to folder named \Downloads") > End if > </SCRIPT> > > <SCRIPT LANGUAGE=VBScript RUNAT=Server> > Stop > Set fso = Server.CreateObject("Scripting.FileSystemObject") > > fln = fso.GetFileName("H:\Downloads\test.txt") > Response.Write(fln & "<br>") > > set objFile = fso.GetFile ("H:\Downloads\test.txt") > > ' fails here > Response.Write("<br>Have bound to file named test.txt") > > </SCRIPT> > -------------------------------- > > Any ideas? > > > Victor > >
- Next message: Aaron [SQL Server MVP]: "Re: (OT?) HTML Question"
- Previous message: James Baker: "Re: (OT?) HTML Question"
- In reply to: gadya: "problem using FileSystemObject"
- Next in thread: gadya: "Re: problem using FileSystemObject"
- Reply: gadya: "Re: problem using FileSystemObject"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|