hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
User's Guide


Previous Contents Index


DELETE

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

DCL Format

DELETE remote_files

DELETE/DIRECTORY remote_directory


UNIX Format

delete remote_file

mdelete remote_files

rmdir remote_directory


Parameters

remote_file

remote_files

remote_directory

Required.

File, files, or directory to delete.


Qualifiers

/DIRECTORY

Optional. 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.


Examples

#1

FTP> DELETE [MAIN.BRANCH]*.*;* 
250 DELE of [MAIN.BRANCH]*.*;* successful.
      

Deletes all files in the remote OpenVMS directory [MAIN.BRANCH].

#2

FTP> DELETE/DIRECTORY BRANCH.DIR;1
250 RMD command successful.
      

Deletes the directory [MAIN.BRANCH].

#3

FTP> DELETE "/users/venture/carton" 
250 DELE command successful.
      

Deletes UNIX file with path name /users/venture/carton .

#4

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.


DIRECTORY

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.


DCL Format

DIRECTORY [ /BRIEF | /OUTPUT=output_file ] [ remote_directory ]


UNIX Format

ls [ /remote/path ]

mls [ /remote/path]


Parameters

remote_directory

/remote/path

Optional. Default: default directory.

Directory with the file names you want to list. Wildcards and multiple directories are valid.


Qualifiers

/BRIEF

Optional. Default: full display.

Produces output similar to the UNIX ls command.

/OUTPUT=output_file

Optional. 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.


Examples

#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  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.

#2

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 (10.06 Kbyte/s) 
FTP>
      

Displays a listing of file names in the directory of the connected host, which is another OpenVMS system.


DISCONNECT

Terminates your session with the remote host and returns to the FTP prompt.

DCL Format

DISCONNECT


UNIX Format

close

disconnect


Example


FTP> DISCONNECT
221 Goodbye.
      

Disconnects the user from an OpenVMS system.


ENABLE (DISABLE) LOG

Enables or disables the display of all protocol commands sent to the remote host.

Default: DISABLE LOG.


DCL Format

ENABLE LOG

DISABLE LOG


UNIX Format

debug


Example


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 (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.


ENABLE (DISABLE) PARSE

Enables or disables the expansion of remote file names during file transfers.

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.


DCL Format

ENABLE PARSE

DISABLE PARSE


UNIX Format

glob


Examples

#1

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.

#2

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 


ENABLE (DISABLE) PORT_COMMAND

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.


DCL Format

ENABLE PORT_COMMAND

DISABLE PORT_COMMAND


UNIX Format

sendport


Example


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 enters a PORT command before the file transfer.


ENABLE (DISABLE) REPLY

Enables or disables the display of all responses from the remote host.

Default: ENABLE REPLY.


DCL Format

ENABLE REPLY

DISABLE REPLY


UNIX Format

debug


EXAMPLES

#1

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.

#2

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.


ENABLE (DISABLE) TRANSFER_VERIFICATION

Enables or disables the display of # for each 1000 bytes of transferred data.

Default: DISABLE TRANSFER_VERIFICATION.


DCL Format

ENABLE TRANSFER_VERIFICATION

DISABLE TRANSFER_VERIFICATION


UNIX Format

hash


Example


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 (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.


ENABLE (DISABLE) VMS_PLUS

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:

Defaults:


DCL Format

ENABLE VMS_PLUS

DISABLE VMS_PLUS


UNIX Format

There is no UNIX equivalent for the ENABLE or DISABLE VMS_PLUS command.

EXIT

Closes an open connection and exits from FTP. Pressing Ctrl/Z is equivalent to the EXIT command.

DCL Format

EXIT


UNIX Format

quit

bye


FTP

The File Transfer Protocol (FTP) command starts an FTP session and does one of the following:

DCL Format

FTP [ host [ port ] ] [ /USERNAME=remote_user_name ]
[ /PASSWORD=password ]
[ /INPUT=input_filespec ]


UNIX Format

ftp [ host [ port ] ]


Parameters

host

Optional.

Remote host to which you want to connect.

port

Optional.

Specifies the port to use.


Qualifiers

/INPUT=input-filespec

Optional. 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=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.


Examples

#1

$ FTP 
FTP> 
      

Starts an FTP user session without establishing a connection.

#2

$ 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 .

#3

$ 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.


GET

The GET command does the following:

To use this command, you must have an FTP session with a remote host.


DCL Format

GET remote_file [ local_file ]
[ /[NO]CONFIRM ]
[ /FDL]


[ /[NO]LOWERCASE ]


UNIX Format

get remote_file [ local_file ]

mget remote_files


Parameters

remote_file

Required.

Name of the remote file to copy.

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 the following:


Qualifiers

/CONFIRM

Optional. Default: immediate execution.

Asks you for confirmation before executing the copy operation.

/FDL

Optional. 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:

/[NO]LOWERCASE

Optional. 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.


Examples

#1

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.

#2

FTP> GET spring.deliveries SPORTS.TXT 
      

Copies the same file ( spring.deliveries ) when it is in your remote working directory.

#3

FTP> mget *.doc
200 PORT command successful 
150 Opening ASCII mode data connection for cast.doc;1 (130.180.4.8,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 (130.180.4.8,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 .

#4

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 (130.180.4.8,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) 

#5

FTP> get/fdl feathers.dis
      

Copies and preserves the record attributes of feathers.dis . (A put/fdl command was entered previously.)


Previous Next Contents Index