FTP from Master to server
WLB Automation
Junior Member
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
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
-
WLB Automation wrote: »But I need help with the sending of a file that is on a master to the server.
AMX has a solution for this...
http://www.amx.com/products/i!-FTPSender.asp -
FTP sending
Thanks for the reply,
I found the product on the AMX site. I'm working trough it to see how it must be done.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums