HP OpenVMS Systems Documentation
HP TCP/IP Services for OpenVMS
Deletes either UNIX or OpenVMS remote files. To use this command, you must have an FTP session with a remote host.
Use caution with the mdelete command. The FTP command DIRECTORY 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.
File, files, or directory to delete.
/DIRECTORYOptional. The /DIRECTORY qualifier must follow immediately after the DELETE command without a preceding space.
Deletes an empty directory. To delete a directory that is not empty, you must first delete the contents of the directory.
FTP> DELETE [MAIN.BRANCH]*.*;* 250 DELE of [MAIN.BRANCH]*.*;* successful.
Deletes all files in the remote OpenVMS directory [MAIN.BRANCH].
FTP> DELETE/DIRECTORY BRANCH.DIR;1 250 RMD command successful.
Deletes the directory [MAIN.BRANCH].
FTP> DELETE "/users/venture/carton" 250 DELE command successful.
Deletes 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 . 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 DIRECTORY command supports the redirecting of output to a file.
DIRECTORY [ /BRIEF | /OUTPUT=output_file ] [ remote_directory ]
ls [ /remote/path ]
mls [ /remote/path]
/remote/pathOptional. Default: default directory.
Directory with the file names you want to list. Wildcards and multiple directories are valid.
/BRIEFOptional. Default: full display.
Produces output similar to the UNIX ls command.
/OUTPUT=output_fileOptional. If you do not specify the /OUTPUT qualifier, FTP displays output to SYS$OUTPUT. If you do specify the /OUTPUT qualifier, you must supply a valid output_file specification.
Name of the file to hold the output.
FTP> DIRECTORY 200 PORT command successful 150 Opening data connection for /bin/ls (126.96.36.199,1150) total 76 -rwxr-x--x 1 geary users 261 Nov 6 2002 .cshrc -rw-r--r-- 1 root users 128 May 21 11:16 .mailrc -rwxr-x--x 1 geary users 182 Nov 6 2002 .profile drwxr-x--x 2 geary users 512 Nov 6 2002 bin . . . 226 Transfer complete. 911 bytes received in 00:00:00.07 seconds
Displays 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] (188.8.131.52.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 (10.06 Kbyte/s) FTP>
Displays a listing of file names in the directory of the connected host, which is another OpenVMS system.
Terminates your session with the remote host and returns to the FTP prompt.
FTP> DISCONNECT 221 Goodbye.
Disconnects the user from an OpenVMS system.
Enables or disables the display of all protocol commands sent to the remote host.
Default: DISABLE LOG.
FTP> ENABLE LOG Bell off. Debugging on (debug=1). FTP> ENABLE REPLY Reply on. Verbose mode on. FTP> PUT PRICES.TXT YEAR.PRICES ---> PORT 1,2,3,4,7,138 200 PORT command successful. ---> STOR PRICES.TXT 150 Opening ASCII mode data connection for small.txt (1,2,3,4,7,138). 226 Transfer complete. local: WORK1$:[samson]prices.txt;1 remote: year.prices 609 bytes sent in 00:00:00.02 seconds (179.36 Kbytes/s) FTP> GET LAKE.IBIS LAKE_IBIS.DAT ---> PORT 1,2,3,4,7,138 200 PORT command successful ---> RETR lake.ibis 150 Opening ASCII mode data connection for lake.ibis (184.108.40.206,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.
FTP> ENABLE PARSE FTP> PUT BIRDS*.TXT
Enables parsing and the expansion of wildcards. Copies all local files starting with the characters BIRDS and ending with .TXT 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 the following:
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.
FTP> ENABLE PORT_COMMAND FTP> PUT CODE.TXT 200 PORT command successful 150 Opening data connection for CODE.TXT (220.127.116.11,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 enters a PORT command before the file transfer.
FTP> ENABLE REPLY Reply on. Verbose mode on. FTP> get birds.txt dogs.txt 200 PORT command successful. 150 Opening ASCII mode data connection for birds.txt (130,180,10,8,1570) (2405 bytes). 226 Transfer complete. local: WORK1$:[SAMSON]DOGS.TXT;1 remote: birds.txt 2405 bytes received in 00:00:00.03 seconds (60.22 Kbytes/s) FTP>
Enables the display of all the responses from the remote host. Copies birds.txt from the remote host to the local file dogs.txt , and shows all the executed FTP commands in progress.
FTP> DISABLE REPLY Bell off. Reply off. Verbose off. FTP> get birds.txt dogs.txt FTP>
Disables the display of all the responses from the remote host. Copies birds.txt from the remote host.
Enables or disables the display of # for each 1000 bytes of transferred data.
FTP> ENABLE TRANSFER_VERIFICATION Bell off. Hash mark printing on (1024/hash mark). FTP> GET FUTURES.DIS FUTURES_H2.DIS 200 PORT command successful 150 Opening data connection for futures.dis (18.104.22.168,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 command SITE. (Older implementations of the FTP server do not support this command.) The FTP client uses the SITE command to identify itself (its SITE type) to the remote host. The SITE type of an FTP client can be one of the following:
- +VMS+ --- The client is in VMS Plus mode.
- NONE --- The client is not in VMS Plus mode.
- When you use FTP to connect to an OpenVMS host running TCP/IP Services, VMS Plus Mode is enabled.
- When you use FTP to connect to a non-OpenVMS host or to an Open VMS system running software that does not recognize VMS Plus Mode, VMS Plus Mode is disabled.
There is no UNIX equivalent for the ENABLE or DISABLE VMS_PLUS command.
Closes an open connection and exits from FTP. Pressing Ctrl/Z is equivalent to the EXIT command.
The File Transfer Protocol (FTP) command starts an FTP session and does one of the following:
- Displays the FTP prompt. You can enter 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=input_filespec ]
ftp [ host [ port ] ]
Remote host to which you want to connect.
Specifies the port to use.
/INPUT=input-filespecOptional. If you do not specify the /INPUT qualifier, FTP takes input from SYS$INPUT. If you specifiy this qualifier, you must also supply an input file specification. FTP continues to prompt until it has a valid input file specification.
Runs a DCL command file with FTP commands.
/PASSWORD=passwordOptional. Default: your password on the local system.
Password for the remote user account to which you want to connect.
/USERNAME=remote_user_nameOptional. Default: your user name on the local system.
Name of the remote user account to which you want to connect.
$ FTP FTP>
Starts an FTP user session without establishing a connection.
$ FTP WKSITE [Return] 220 wksite.texts.wrights.com FTP Server (UNIX 13:34:28 EDT) ready Connected to wren.nest.willow.com. Name (wksite:parks) [Return] 331 Password required for parks. Password: [Return] 230 User parks logged in. FTP>
User PARKS starts an FTP session and connects to UNIX host wksite .
$ FTP NEWY /USERNAME=BENSON /PASSWORD=WMSWMS 220 NEWY.LINK1.MOA.COM FTP Server (Version 5.0) ready Connected to NEWY.LINK1.MOA.COM. 331 Username BENSON requires a password. 230 User logged in. FTP>
Starts an FTP session and connects to remote OpenVMS host NEWY in user account BENSON.
The GET command does the following:
- Copies remote files to the local host.
- Copies files from a DECnet node.
To use this command, you must have an FTP session with a remote host.
GET remote_file [ local_file ]
[ /[NO]CONFIRM ]
[ /[NO]LOWERCASE ]
get remote_file [ local_file ]
Name of the remote file to copy.
- To copy multiple files, separate the file 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, and file name.
local_fileOptional. 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 the following:
- Multiple remote files
- Wildcards in the the remote file name
/CONFIRMOptional. Default: immediate execution.
Asks you for confirmation before executing the copy operation.
/FDLOptional. Default: no secondary file created.
Uses a secondary file with the copied file's OpenVMS RMS record attributes (if you previously entered 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.
/[NO]LOWERCASEOptional. Default: /LOWERCASE
Forces a file name to lowercase at the destination. Use the /NOLOWERCASE qualifier to make sure the file name is preserved in the existing case.
FTP> get "/seasons/standings/spring.deliveries" SPORTS.TXT 200 PORT command successful 150 Opening ASCII mode data connection for spring.stats. . . .
Copies the UNIX file spring.deliveries to an OpenVMS host, where it is named SPORTS.TXT.
FTP> GET spring.deliveries SPORTS.TXT
Copies the same file ( spring.deliveries ) when it is in your remote working directory.
FTP> mget *.doc 200 PORT command successful 150 Opening ASCII mode data connection for cast.doc;1 (22.214.171.124,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 ASCII mode data connection for director.doc;3 (126.96.36.199,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>
Copies all the UNIX files ending with doc .
FTP> get/confirm *.*;* Get EDTINI.EDT ? [Y or N] [Y]: Y . . .
Before 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.
To confirm mput , mget , and mdelete operations, use the FTP prompt command before entering the mput , mget , and mdelete commands.
FTP> prompt Interactive mode on. FTP> mget C* Get CHRONOS ? [Y or N or Q or G] [Y]: y 200 PORT command successful. 150 Opening ASCII mode data connection for CHRONOS (188.8.131.52,2150) (1596 bytes). 226 Transfer complete. local: WORK1$:[VANA]CHRONOS.;2 remote: CHRONOS 1596 bytes received in 00:00:00.04 seconds (31.80 Kbytes/s)
FTP> get/fdl feathers.dis
Copies and preserves the record attributes of feathers.dis . (A put/fdl command was entered previously.)