SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FTPPutFile

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
FTPPutFile
Author Message
Robert Balsamo



Joined: 11 Jan 2002
Posts: 9

Post FTPPutFile Reply with quote

Can the FTPPutFile command be modified to send a text file in ascii format as opposed to binary?

Tue Jan 25, 2000 11:58 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6484

Post Re: FTPPutFile Reply with quote

: Can the FTPPutFile command be modified to send a text file in ascii format as
: opposed to binary?

No, it always does a binary transfer. However, you can convert a file to ASCII before FTP. Here is how

24x7 v2.0 (beta)
Dim replace_count, number
FileReplaceEx( "sometext.txt", "\n", "\r\n", replace_count)

24x7 v1.x

Dim pointer, number
Dim buffer, string
Dim found, boolean

// Read file
FileReadAll( "sometext.txt", buffer )

// Replace NL with CR\NL pair
Pos( buffer, "\n", 1, pointer)
isGreater( pointer, 0, found)

LoopWhile( found, ENDLOOP )

Replace( buffer, pointer, 1, "\r\n", buffer )

Pos( buffer, "\n", pointer, pointer)

isGreater( pointer, 0, found)
ENDLOOP:

// Write ASCII file
FileSave( "tabtext.txt", buffer )


Tue Jan 25, 2000 12:30 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.