2.14.1.11 oftp

Brief Information

Connect to ftp server to send/receive files

Additional Information

Minimum Origin Version Required: 8.6

Command Line Usage

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;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Server server

Input

string

<unassigned>
Specify the server to be connected. Both IP address and domain name can be used.
User user

Input

string

<unassigned>
Specify the user name.
Password pw

Input

string

<unassigned>
Specify the password.
Remote Path rpath

Input

string

<unassigned>
Specify the remote path on the server.
Local Path lpath

Input

string

<unassigned>
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

<unassigned>
Specify the command to execute.

Option list:

  • Directory
    Directory of the contents under the specified Remote Path on the server, including folders and files.
  • Receive
    Download the files listed in File Names from the Remote Path on the server.
  • Send
    Upload the files listed in File Names to the Remote Path on the server.
  • Delete
    Delete the files listed in File Names from the Remote Path on the server.
Binary Mode binary

Input

int

<unassigned>
Specify whether to download or upload files in binary mode.
File Names fname

Input

string

<unassigned>
Specify the file to download or upload.

Description

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.

Examples

This example shows how to upload a data file (D:\MyData.dat) to OriginLab Technical Support via OriginLab FTP.

  1. Open Command Window by main menu Window: Command Window.
  2. Run oftp -d; in Command Window to open the oftp dialog.
  3. Fill the settings as the picture shows:
    • Server: ftp.originlab.com
    • User and Password: both are anonymous
    • Romote Path: /incoming/
    • Local Path: d:\
    • Command: Send
    • File Names: MyData.dat
    Oftp Dialog Settings.png
  4. Click OK to send the specified data file. After completion, the following information is displayed.
    D:\MyData.dat uploaded.

Keywords:ip address, domain, directory, download, upload