You can copy files to and from DECnet nodes and get remote directory information, if your host and the DECnet node are connected through a host running DIGITAL TCP/IP Services for OpenVMS. Use the full file specification, including the node, device, directory, and file name.
The following example copies local file FAX.TXT to DECnet node CURTAIL, renaming the file to CURRENT.TXT:
FTP> PUT FAX.TXT CURTAIL::DISK$3:[GEARY.KEEPS]CURRENT.TXT
The following GET command copies remote OpenVMS file HOUSING.TXT from DECnet node HABTAT and renames it to HOUSE.TXT:
FTP> GET HABTAT::DISK$2:[NATL.UTAH.SWEST]HOUSING.TXT HOUSE.TXT
Using FTP, you can:
Follow these requirements:
Note that you can also use the DCL PRINT command to print files across
the network. To determine the best service to use for your printing
needs, see Section 1.1. For more information about the DCL PRINT
command, see Chapter 7.
3.15.1 Print Form
FTP supports nonprint forms only.
A SHOW STATUS command shows the form type as NON_PRINT.
3.15.2 Examples Using FTP to Print
The following example sends the file MEMO.TXT from the local host to the printer LNAX:, which is connected to the remote host:
FTP> PUT MEMO.TXT LNAX:
This next example copies remote file q4earnings and sends it to local printer LPA0:.
FTP> GET Q4EARNINGS LPA0:
While using FTP, you can use the SPAWN command to suspend your current session and create a subprocess at the local DCL prompt. At the DCL prompt, you can then enter any number of DCL commands. (You can also specify a DCL command in the SPAWN command line.) To return to your suspended FTP session (exiting the DCL subprocess), enter the LOGOUT command. In the following example, the user suspends the FTP session to list the files in the working directory on the local host and delete one of the files in that directory.
FTP> SPAWN $ DIR . . . $ DEL TR3.TXT:* $ LOGOUT . . . FTP>
To start FTP, issue the FTP command at the DCL prompt.
To use FTP commands, type them at the FTP> prompt.
This section provides complete descriptions of each FTP command, listed alphabetically. The related ENABLE and DISABLE commands are presented together (see the description for ENABLE).
Appends a local file to a remote file. The remote file can reside on any system that supports FTP. To use this command, you must have an FTP session with a remote host.
APPEND local_file [ remote_file ]
append local_file [ remote_file ]
No wildcards.
local_file
Required.Name of the local OpenVMS file.
remote_file
Optional.Name of the remote file, either UNIX or OpenVMS.
FTP> APPEND LARGE.TXT CHRONOS 200 PORT command successful 150 Opening data connection for chronos. (130.180.4.8,1108) 226 Append transfer complete local:large.txt remote:chronos 15596 bytes sent in 00:00:00.10 seconds (152.30 Kbytes/s)
Appends local file LARGE.TXT to UNIX file chronos.
Establishes an FTP connection to a remote host. The remote host can be any operating system that supports FTP.
CONNECT remote_host [ port ]
open remote_host [ port ]
remote_host
Required.Remote host to which you want to connect.
port
Optional. Default: 21.FTP port on the remote host.
FTP> CONNECT RETAIL [Return] 220 retail.good_co.com FTP Server (DIGITAL UNIX Thur Jan 2 1997) Ready Connected to roc.bird.com. Name (retail:dave): [Return] 331 Password required for dave Password: (not echoed)[Return] 230 User dave logged in FTP>
User dave connects to UNIX host retail.
Creates a directory on the remote host. The remote directory can be on any operating system that supports FTP. To use this command, you must have an FTP session with a remote host.
CREATE/DIRECTORY remote_directory
mkdir remote/path
remote_directory
remote/path
Required.Name for the created directory.
#1
FTP> CREATE/DIRECTORY TERM 257 MKD command successful.
#2In this example:
- The remote host is UNIX.
- The working directory is /usr/staff/dir.
- The command creates directory /usr/staff/dir/term.
FTP> CREATE/DIRECTORY [.TRANSFERS] 257 MKD command successful.
In this example:
- The remote host is OpenVMS.
- The working directory is DUA2:[CENTRAL].
- The command creates the OpenVMS directory DUA2:[CENTRAL.TRANSFERS].
Deletes either UNIX or OpenVMS remote files. To use this command, you must have an FTP session with a remote host.
Note
Use caution with the mdelete command. The FTP DIRECTORY command does not list hidden files (files that start with a period). Using the mdelete command with any wildcard deletes hidden files, which you might need.
DELETE remote_file
DELETE/DIRECTORY remote_directory
delete remote_file
mdelete remote_files
rmdir remote_directory
remote_file
remote_files
remote_directory
Required.File, files, or directory to delete.
/DIRECTORY
Optional. The /DIRECTORY qualifier must follow immediately after the DELETE command without a space.Deletes an empty directory. To delete a directory that is not empty, you must first delete the contents of the directory.
#1
FTP> DELETE [MAIN.BRANCH]*.*;* 250 DELE of [MAIN.BRANCH]*.*;* successful.
#2Deletes all files in the remote OpenVMS directory [MAIN.BRANCH].
FTP> DELETE/DIRECTORY BRANCH.DIR;1 250 RMD command successful.
#3Deletes the directory [MAIN.BRANCH].
FTP> DELETE "/USERS/VENTURE/CARTON" 250 DELE command successful.
#4Deletes UNIX file with path name /users/venture/carton.
FTP> mdelete "/BIDS/WEST/JANUARY97/"C* 250 DELE command successful. 250 DELE command successful. 250 DELE command successful.
Deletes three UNIX files starting with the letter "c" from directory /bids/west/january97. Quotation marks are required because of the slashes in the UNIX file name. The asterisk (*) is not quoted to preserve its use as a wildcard. (Note that the messages generated depend on the server. For example, for an OpenVMS server, messages would specify the names of the files deleted.)
Lists the names of remote files and other information about them. The remote files can be on any FTP server. To use this command, you must have an FTP session with a remote host.The DCL-style DIRECTORY command supports the redirecting of output to a file.
DIRECTORY[ /BRIEF | /OUT=output_file ] [ remote_directory ]
ls [ /remote/path ]
remote_directory
/remote/path
Optional. Default: default directory.Directory with the file names you want to list. Wildcards and multiple directories are valid.
For a directory listing of files on a DECnet node, use the full specification:
node::device:[directory]file
/BRIEF
Optional. Default: full display.Produces output similar to the UNIX ls command.
/OUT=output_file
Optional. Default: screen output.Name of the file to hold the output.
#1
FTP> DIRECTORY 200 PORT command successful 150 Opening data connection for /bin/ls (130.180.9.8,1150) total 76 -rwxr-x--x 1 geary users 261 Nov 6 1996 .cshrc -rw-r--r-- 1 root users 128 May 21 11:16 .mailrc -rwxr-x--x 1 geary users 182 Nov 6 1996 .profile drwxr-x--x 2 geary users 512 Nov 6 1996 bin . . . 226 Transfer complete. 911 bytes received in 00:00:00.07 seconds
#2Displays a full listing of file names in the current default UNIX directory.
FTP> LS DISK3$:[BANKS.BRANCH.BILLS] 200 PORT command successful 150 Opening data connection for DISK3$:[BANKS.BRANCH.BILLS] (11.1.2.3.4) LOCAL_ACCTS.DIS;1 GO_FIGURE.EXE;14 COMPARE.EXE;4 SUMTOTAL.COM;1 226 NLST Directory transfer complete. 428 bytes received in 00:00:00.41 seconds FTP>
Displays a listing of file names in the directory of the connected host, which is another OpenVMS system.
Terminates your FTP session with the remote host and returns to the FTP prompt.
DISCONNECT
close
disconnect
Enables or disables the display of all protocol commands sent to the remote host.Default: DISABLE LOG.
ENABLE LOG
DISABLE LOG
debug
FTP> ENABLE LOG FTP> ENABLE REPLY FTP> PUT PRICES.TXT YEAR.PRICES ---> PORT 1,2,3,4,7,138 ---> STOR PRICES.TXT 609 bytes sent in 00:00:00.02 seconds FTP> GET LAKE.IBIS LAKE_IBIS.DAT ---> PORT 1,2,3,4,7,138 200 PORT command successful ---> WRITER lake.ibis 150 Opening data connection for lake.ibis (1.2.3.4,193) 226 Transfer complete local: LAKE_IBIS.DAT remote:lake.ibis 4 bytes received in 00:00:00.03 seconds (0.13 Kbytes/s) FTP>
Turns on the display of commands sent to the remote host. Shows all the commands sent to the remote host during the execution of PUT and GET.
Enables or disables the expansion of remote file names during file transfers.
- PUT operations: expansion is done by the local host.
- GET operations: expansion is done on the remote host.
During GET operations, an expansion of a directory name might be different from the expansion of other file names. The result depends on the operating systems of the remote and local hosts.
ENABLE PARSE
DISABLE PARSE
glob
#1
FTP> ENABLE PARSE FTP> PUT BIRDS*.TXT
#2Enables parsing and the expansion of wildcards. Copies all the files starting with the letters BIRDS to the remote host.
FTP> ENABLE PARSE FTP> GET *.DOC
Because parsing is enabled, the remote host expands the wildcard. All remote files ending in ".doc" are copied to the local system.
The command is equivalent to:
FTP> ENABLE PARSE FTP> MGET *.DOC
Enables or disables the sending of the FTP protocol PORT command to the remote host.By default, FTP sends a PORT command when establishing a connection. If this command fails, FTP uses the default data port (20).
Disable the sending of the PORT command when you communicate with remote hosts that ignore PORT commands.
Default: ENABLE PORT_COMMAND.
ENABLE PORT_COMMAND
DISABLE PORT_COMMAND
sendport
FTP> ENABLE PORT_COMMAND FTP> PUT CODE.TXT 200 PORT command successful 150 Opening data connection for CODE.TXT (130.180.10.8,1182) 226 Transfer complete local: DISK$PROJECT6:[MANAGEMENT]CODE.TXT;9 remote: CODE.TXT 3634 bytes sent in 00:00:00.04 seconds (88.72 Kbytes/s)
FTP issues a PORT command before the file transfer.
Enables or disables the display of all the responses from the remote host.Default: ENABLE REPLY.
ENABLE REPLY
DISABLE REPLY
debug
FTP> DEBUG Debugging on (debug=1). FTP> GET CONDOR CONDOR.DAT 200 PORT command successful Opening data connection for CONDOR. (16.20.40.96,1094) 226 Transfer complete local: CONDOR.DAT remote: condor 24372 bytes received in 00:00:00.05 seconds (476.01 Kbytes/s) FTP>
Enables the display of all the responses from the remote host. Copies CONDOR.DAT from the remote host, showing all the executed FTP commands in progress.
Enables or disables the display of # for each 1000 bytes of transferred data.
ENABLE TRANSFER_VERIFICATION
DISABLE TRANSFER_VERIFICATION
hash
FTP> ENABLE TRANSFER_VERIFICATION FTP> GET FUTURES.DIS FUTURES_H2.DIS 200 PORT command successful 150 Opening data connection for futures.dis (11.20.99.100,26) ############### 226 Transfer complete. local: FUTURES_H2.DIS remote: futures.dis 15596 bytes received in 00:00:00.11 seconds (138.45 Kbytes/s) FTP>
Enables the display of # for each 1000 bytes of transferred data. Copies futures.dis to FUTURES_H2.DIS, showing when 1000 bytes are transferred.
Enables or disables VMS Plus Mode. This lets you specify a transfer mode based on file type, for example, ASCII or image.With VMS Plus Mode disabled, FTP does not send the FTP SITE command. (Older implementations of the FTP server do not support this command.) The FTP client uses the FTP SITE command to identify itself (its SITE type) to the remote host. The SITE type of an FTP client can be either:
- +VMS+ --- The client is in VMS Plus mode.
- NONE --- The client is not in VMS Plus mode.
Defaults:
- When you use FTP to connect to an OpenVMS host, VMS Plus Mode is enabled.
- When you use FTP to connect to a non-OpenVMS host, VMS Plus Mode is disabled.
ENABLE VMS_PLUS
DISABLE VMS_PLUS
Closes an open connection and exits FTP. Equivalent to Ctrl/Z.
EXIT
quit
Starts an FTP session and does one of the following:
- Displays the FTP prompt. You can issue FTP commands to customize your environment and FTP command processing.
- Establishes a connection to the specified remote host.
FTP [host [ port ] ] [/USERNAME=remote_user_name | /PASSWORD=password | /INPUT=file]
ftp [ host [ port ] ] [ local_file ]
host
Optional.Remote host to which you want to connect.
port
Optional. Default: 21.FTP port on the remote host.
/INPUT=file
Optional. Default: interactive input.Runs a DCL command file with FTP commands.
/PASSWORD=password
Optional. Default: your password on the local system.Password for the remote user account to which you want to connect.
/USERNAME=remote_user_name
Optional. Default: your user name on the local system.Name of the remote user account to which you want to connect.
#1
$ FTP WKSITE [Return] 220 wksite.texts.wrights.com FTP Server (DIGITAL UNIX 13:34:28 EDT) Ready Connected to wren.nest.willow.com. Name (wksite:parks) [Return] 331 Username PARKS requires a password Password: (not echoed) [Return] 230 User logged in FTP>
#2User PARKS starts an FTP session and connects to UNIX host wksite.
$ FTP VIRTL /USERNAME=BENSON /PASSWORD=WMSWMS 220 newy FTP Server (Version 4.2) Ready Connected to NEWY.LINK1.MOA.COM. 230 User logged in FTP>
#3Starts an FTP session and connects to remote OpenVMS host VIRTL, in user account BENSON.
$ FTP FTP>
Starts an FTP user session without establishing a connection.
The GET command does the following:
- Copies remote files to the local host.
- Copies files from a DECnet node.
- Prints one remote file.
To use this command, you must have an FTP session with a remote host.
GET[/CONFIRM | /FDL] remote_file [local_file | printer]
get remote_file [ local_file ]
mget remote_files
remote_file
Required.Name of the remote file to copy.
- To copy multiple files, separate the names with commas or plus signs.
- When you specify multiple remote files, you cannot specify a local file name.
- To copy a file from a remote DECnet node, use the full specification: node name, device, directory, file name.
local_file
Optional. Default: Same name (without any device or directory names).New name for the copied file. You cannot specify a local file name if you specify:
- Multiple remote files
- Wildcards in the the remote file name
printer
Optional.Sends a remote file to a local printer.
Specify the actual name of the printer, not the queue name or logical name.
/CONFIRM
Optional. Default: immediate execution. The /CONFIRM qualifier must follow immediately after the GET command without a space.Asks you for confirmation before executing the copy operation.
/FDL
Optional. Default: no secondary file created. The /FDL qualifier must follow immediately after the GET command without a space.Uses a secondary file with the copied file's OpenVMS RMS record attributes (if you previously issued a PUT/FDL command). The SET TYPE command determines the type of file:
- Specifying ASCII results in a sequential file with variable records. Select this type when transferring ASCII text files.
- Specifying IMAGE results in a sequential file with fixed records of 512 bytes. Select this type when transferring non-ASCII files such as executable image files.
#1
FTP> GET "/SEASONS/STANDINGS/SPRING.DELIVERIES" SPORTS.TXT 200 PORT command successful 150 Opening data connection for spring.stats ... . . .
#2Copies the UNIX file spring.deliveries to the OpenVMS host, where it is named SPORTS.TXT.
FTP> GET SPRING.DELIVERIES SPORTS.TXT
#3Copies the same file (spring.deliveries) when it is in your remote working directory.
FTP> MGET *.DOC 200 PORT command successful 150 Opening data connection for cast.doc;1 (16.20.208.100,27) 226 Transfer complete. local:cast.doc;1 remote: cast.doc;1 1222 bytes received in 00:00:00.01 seconds (70.19 Kbytes/s) 200 PORT command successful 150 Opening data connection for director.doc;3 (16.20.208.100,28) 226 Transfer complete. local: director.doc;1 remote: director.doc;3 90 bytes received in 00:00:00.01 seconds (5.49 Kbytes/s) FTP>
#4Copies all the UNIX files ending with doc.
FTP> GET/CONFIRM *.*;* Get EDTINI.EDT ? [Y or N] [Y]: Y . . .
#5Before executing the copy operation for every file in the remote default directory, FTP asks, one-by-one, to confirm that you want to copy each file.
FTP> GET/FDL FEATHERS.DIS
#6Copies and preserves the record attributes of feathers.dis. (A PUT/FDL command was previously issued.)
FTP> GET Q4EARNINGS LPS40_1:
Prints the remote file q4earnings on local printer LPS40_1.
Displays information about how to type FTP commands. Provides help for both DCL-style and UNIX-style commands, as follows:
- HELP --- Displays all the DCL-style FTP commands
- HELP ftp_command --- Displays DCL-style help information for the specified command
- ? --- Displays all the UNIX-style FTP commands
- ? command --- Displays UNIX-style help for the specified command
For a list of available commands, type ?
HELP [/REMOTE] [command ]
help [ command ]
? [ command ]
command
Optional.FTP command about which you would like information.
/REMOTE
Optional. Default: local host.The remote host displays the FTP help information. If the remote host is a UNIX host, the FTP help is all UNIX style. If you want to display information about a specific command, the /REMOTE qualifier must follow the HELP command and precede the name of any command for which you want information, as shown in the second example.
#1
FTP> HELP/REMOTE 214-The following commands are recognized (* =>'s unimplemented). USER PORT RETR MSND* ALLO DELE SITE* XMKD CDUP PASS PASV STOR MSOM* REST* CWD STAT* RMD XCUP ACCT* TYPE APPE MSAM* RNFR XCWD HELP XRMD STOU REIN* STRU MLFL* MRSQ* RNTO LIST NOOP PWD QUIT MODE MAIL* MRCP* ABOR NLST MKD XPWD FTP>
#2The remote host, a UNIX system, displays the FTP commands you can use in your FTP session with this system.
FTP> HELP/REMOTE USER 214 Syntax: USER <sp> username FTP>
The remote host displays information about the FTP USER command.
Initiates the login process and completes it if no password is required. If a password is required, enter it at the password prompt.Use this command if the connection is alive but the login procedure fails when you request a connection.
LOGIN user_name
user user_name
user_name
Required.Your account on the connected remote host.
FTP> CONNECT BYGNET [Return] 220 bygnet.band2.stat.com FTP server (UNIX Thur April 24 1997) Ready Connected to CYGNET.band2.stat.com. Name (bygnet:UserGent): dom [Return] 530 User dom access denied %UCX-E-FTP_LOGREJ, Login request rejected FTP> LOGIN "UserGent" 331 Username UserGent requires a Password Password: (not echoed)[Return] 230 User logged in FTP>
Previous | Next | Contents