469,352 Members | 2,150 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Scripting.FileSystemObject problems

If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
const strFileName = "F:\FileShare\resume.txt"
const fsoForReading = 1
If objFSO.FileExists("F:\FileShare\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFileName, fsoForReading)
#2
Response.Write "" & objTextStream.ReadAll & ""
#3
objTextStream.Close
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP
Jul 19 '05 #1
3 7027
Use something less intrusive than Norton.
http://www.aspfaq.com/2180

"PB4FUN" <th*********@doesnot.exist> wrote in message
news:#m**************@TK2MSFTNGP10.phx.gbl...
If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
const strFileName = "F:\FileShare\resume.txt"
const fsoForReading = 1
If objFSO.FileExists("F:\FileShare\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFileName, fsoForReading) #2
Response.Write "" & objTextStream.ReadAll & ""
#3
objTextStream.Close
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP

Jul 19 '05 #2
Maybe this.
http://www.aspfaq.com/2180

Ray at home

"PB4FUN" <th*********@doesnot.exist> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
the page hangs.

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

Jul 19 '05 #3
Thanx, it works !!!!

Meindert, MCP

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
Use something less intrusive than Norton.
http://www.aspfaq.com/2180

"PB4FUN" <th*********@doesnot.exist> wrote in message
news:#m**************@TK2MSFTNGP10.phx.gbl...
If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
const strFileName = "F:\FileShare\resume.txt"
const fsoForReading = 1
If objFSO.FileExists("F:\FileShare\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFileName,

fsoForReading)
#2
Response.Write "" & objTextStream.ReadAll & ""
#3
objTextStream.Close
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by MeAndI | last post: by
2 posts views Thread by John | last post: by
1 post views Thread by andrewcw | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.