SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Download a web file

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Download a web file
Author Message
Jim



Joined: 15 May 2001
Posts: 5

Post Download a web file Reply with quote

Trying to download a web file using:

WebGetFile( "http://home.microsoft.com/";, "c:\temp\temp.txt" )

Get error message: Error opening file for writing.

Can somone help, I'm new to this program.

Tue May 15, 2001 3:56 pm View user's profile Send private message
Jim



Joined: 15 May 2001
Posts: 5

Post Re: Download a web file Reply with quote

Was able to get this to work but can you append to a text file instead of overwriting it each time. Using this to fire an ASP page and want to use the text file as a log.

: Trying to download a web file using: WebGetFile( "
: http://home.microsoft.com/"; ;, "c:\temp\temp.txt" )

: Get error message: Error opening file for writing.

: Can somone help, I'm new to this program.

Tue May 15, 2001 4:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Download a web file Reply with quote

Sure you can do that, here is the sample script

Dim( f, number )
Dim( buffer, string)
WebGetFile( "http://home.microsoft.com/";, "c:\\temp\\temp2.txt" )
FileReadAll( "c:\\temp\\temp2.txt", buffer )
FileOpen( "c:\\temp\\temp.txt", "StreamMode", "Write", "Append", f )
FileWrite( f, buffer )
FileClose( f )
FileDelete( "c:\\temp\\temp2.txt" )

: Was able to get this to work but can you append to a text file instead of
: overwriting it each time. Using this to fire an ASP page and want to use
: the text file as a log.

: Trying to download a web file using: WebGetFile( "
: http://home.microsoft.com/";; ;, "c:\temp\temp.txt" )

: Get error message: Error opening file for writing.

: Can somone help, I'm new to this program

Tue May 15, 2001 5:00 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.