FTP from Master to server

WLB AutomationWLB Automation Junior MemberPosts: 6
Hi there,

Hope someone can help me, this is my first time posting on the forum and I know this topic has been discussed often. But I need help with the sending of a file that is on a master to the server.

I am connecting to the server from the master via FTP, so connection is fine. I am converting the data to xml and writing it to a file on the master and that is all OK.
_____________________________________________________________________________
DEFINE_FUNCTION fnWRITE ()
{
LOCAL_VAR SLONG HFile
LOCAL_VAR SLONG nBytes
LOCAL_VAR CHAR fBUF[100]

HFile = FILE_OPEN('Temp_TMprobe.XML',2)
if(HFile>0)
{
fBUF = cXML_String

nBytes = FILE_WRITE(HFile,fBUF,LENGTH_STRING(fBUF))
SEND_STRING 0,'SUCCESS'


FILE_CLOSE(HFile)
}
ELSE
{
SEND_STRING 0,"'BAD FILE OPENING',ITOA(HFILE)"
}
}
__________________________________________________________________________________________

To send the file to the server one would use something like the following command:

Send_String dvWebDataTx,"'STOR Temp_TMprobe.XML',$0D,$0A"

when this command is sent it just creates a file on the server with the name Temp_TMprobe.xml and obviously does not extract the file from the master to be sent.

How do I get the actual file from the master to the send command.

Your help will be appreciated.

Thanks,

Wim

Comments

Sign In or Register to comment.