e-FTP script commands

This section describes the communication script commands.

Communication Script Commands. Use these commands to build script files that automate your communications activities. Script files are text files containing script commands that perform a communications task. You can create scripts that call a host system, read mail, transfer files, etc.

Command

Description

Syntax and example

DirRemoteChange

Allows you to change to another working directory on a remote machine

Syntax: DirRemoteChange <path and name of new directory>

Example – DirRemoteChange /home/usr

RemoteParentDir

Shows files in the Parent directory on a remote machine.

Syntax: RemoteParentDir

DirRemoteDelete

Allows you to delete a directory on a remote machine.

Syntax: DirRemoteDelete <name of directory to be deleted>

For example – DirRemoteDelete home/trading partner

DirRemoteRename

Allows you to rename a directory on a remote machine.

Syntax: DirRemoteRename <original directory name | new directory name>

For example – DirRemoteRename home/trading partner | home/tp

FilesRemoteDelete

You can delete files from a remote machine.

Syntax: FilesRemoteDelete <name of file>

For example – FilesRemoteDelete whatsnew.txt

FilesRemoteRefresh

Refresh file listing

Syntax: FilesRemoteRefresh <drive:\ or drive:\filename>

For example – FilesRemoteRefresh c:\

FilesRemoteAllDelete

Delete all files from remote machine.

Syntax: FilesRemoteAllDelete

DirLocalDelete

Delete specified directory located on local machine

Syntax: FilesLocalDelete <local drive:\dir name>

For example – FilesLocalDelete c:\TradingPartner

DirLocalRename

Rename specified directory on local machine.

Syntax: DirLocalRename <local drive:\filename | local drive:\new filename>

For example – DirLocalRename c:\TradingPartner | c:\TP

FilesLocalDelete

Delete specified files from local machine.

Syntax: FilesLocalDelete <drive:\filename>

For example – FilesLocalDelete c:\error_log.log

FilesLocalMkDir

Creates a directory on the local drive

Syntax: FilesLocalMkDir <drive:\new directory name>

For example – FilesLocalMkDir c:\TradingPartners

FilesLocalRename

Rename files located on local machine.

Syntax: FilesLocalRename <drive:\old file name | drive:\new file name>

For example – FilesLocalRename c:\error_log.log | c:\error_table.log

Put

Will transfer a file from the local system to the remote system.

Syntax: put <filename>

For example – put index.html

Get

To copy one file from the remote machine to the local machine.

Syntax: get <filename>

For example – get mmconv.html

Wildcard

User can specify the wildcard that will be used

Syntax: WILDCARD <user-specified wildcard>

For example – WILDCARD #

ODBCLogOn

Enables writing to a log using ODBC

Syntax:ODBCLOGON

ODBCLogOff

Turns “off” writing to a log using ODBC

Syntax: ODBCLOGOFF

TraceOn

“Turns on” the tracing functionality

Syntax: TraceOn

TraceOff

“Turns off” the tracing functionality

Syntax: TraceOff

ASCIIMode

To set the mode of file transfer to ASCII

Syntax: ascii

For example – ftp>ascii

NoteComputer responds: 200 type set to A. (Note the A, which signifies ASCII mode.)

BinaryMode

to set the mode of file transfer to binary.

Syntax: binary

For example – ftp>binary

NoteComputer responds: 200 Type set to I. (Set to Image format, for pure binary transfers.)

To create a directory on a remote host, follow these steps:

  1. Ensure you are on the appropriate level on the remote host for directory insertion.

  2. Select Remote from the command menu and choose FTP Cmd (Ctrl + G).

  3. The FTP window opens and prompts the user to Enter FTP Command To Execute. Type in mkd <directory name>.

  4. Click OK.

  5. Look in the Events box. If command was executed successfully it will say 257 MKD command successful.