Connect to ftp server to send/receive files
Minimum Origin Version Required: 8.6
1. oftp server:=ftp.originlab.com user:=anonymous pw:=anonymous cmd:=directory;
2. oftp server:=ftp.originlab.com user:=anonymous pw:=anonymous rpath:=/incoming lpath:=d:\ cmd:=send fname:=myData.dat;
3. oftp server:=ftp.originlab.com user:=anonymous pw:=anonymous cmd:=receive lpath:=d:\ fname:=index;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Server | server |
Input string |
|
Specify the server to be connected. Both IP address and domain name can be used. |
User | user |
Input string |
|
Specify the user name. |
Password | pw |
Input string |
|
Specify the password. |
Remote Path | rpath |
Input string |
|
Specify the remote path on the server. |
Local Path | lpath |
Input string |
|
Specify the path on the local machine. If the Command is Receive, the received files will be saved in this specified folder. If the Command is Send, you can just list the file names without the path in the File Names text field if these files are in this local path. |
Command | cmd |
Input int |
|
Specify the command to execute.
Option list:
|
Binary Mode | binary |
Input int |
|
Specify whether to download or upload files in binary mode. |
File Names | fname |
Input string |
|
Specify the file to download or upload. |
This X-Function provides a way to allow two computers on different networks to share data via FTP server. It supports standard methods for sending and receiving files in either ASCII or binary formats. It is also able to list directory contents on FTP server, and delete a specified file on the FTP server.
This example shows how to upload a data file (D:\MyData.dat) to OriginLab Technical Support via OriginLab FTP.
oftp -d;
in Command Window to open the oftp dialog.D:\MyData.dat uploaded.
Keywords:ip address, domain, directory, download, upload