Print Page | Close Window

file system object - buffer problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9728
Printed Date: 31 March 2026 at 3:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: file system object - buffer problem
Posted By: Nathan
Subject: file system object - buffer problem
Date Posted: 11 February 2004 at 4:10am

I am trying to save a large text file (15kb) using the filesystemobject but when I try to save the  file, I get nothing - seems to be a buffer problem. Works fine with smaller files.

Any ideas what I am doing wrong.

Thanks

Nathan




Replies:
Posted By: dj air
Date Posted: 11 February 2004 at 3:00pm

how long is it taking to upload (take to crash )..

is the server timeout high enough

what error are you getting ....



Posted By: Nathan
Date Posted: 13 February 2004 at 8:20am

Basicaly we are trying to make Html versions of all the posts in our forum.

Hence the code:

<%
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")  

for i = 1000 to 1301
  xmlhttp.open "GET", " http://www.corfu-travel-guide.info/message_boards/display_topic_threads.asp?print_page=1&TopicID - http://www.corfu-travel-guide.info/message_boards/display_to pic_threads.asp?print_page=1&TopicID =" & i ,false
 xmlhttp.send  

'write to a file
set fname=fs.OpenTextFile(Server.MapPath("./corfu_posts/topic_" & i & ".html") ,2,true)
fname.Write(xmlhttp.ResponseText)
fname.Close

next

set xmlhttp = nothing 
set fname=nothing
set fs=nothing

%>



Posted By: pmormr
Date Posted: 13 February 2004 at 3:07pm

try putting

Response.Buffer = FALSE

at the top and see if that helps



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Nathan
Date Posted: 15 February 2004 at 5:36am

Thanks Paul. We tried that, but it is the same.

Incidentally, if we first 'GET' the page, and then writeout to the screen, it is fine. But, when we save the object as an html file, we only get about half of the htlm saved. That's why we think it may be a buffer problem. I am getting no crash or error code with the script.

Incidentally, the reason for trying to export all of my treads to HTML pages, is so that when my site visitors use my 'Site Search' (WWG one) they will be able to search all of my site and the forum posts.

Am I going about this in the correct way?

Thanks

Nathan




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net