HPlogo HP ARPA File Transfer Protocol User's Guide > Chapter 4 Using FTP

Transferring MPE/iX Files to the Remote Host

MPE documents

Complete PDF
Table of Contents
Index
Glossary

E0300 Edition 6 ♥
E1098 Edition 5

Use the PUT command to copy a file on your system to the remote host. FTP does not delete the local copy of the file. The file is saved in the remote working directory.

  ftp> PUT localfile remotefile

The remotefile named must follow the file naming conventions for the remote system. If you omit the remotefile name, the file will be saved with the localfile specified:

  ftp> PUT localfile

If the localfile is not a valid file name on the remote system, the file transfer fails.


CAUTION: If the remote file name you specify already exists on the remote host, the remote system may overwrite the existing remote file without warning.

File Naming


Note that other systems may support uppercase and lowercase file names. For example, if you entered the following commands and file names when connected to a UNIX system, the result would be two new remote files named RFILE and rfile.

  ftp> PUT RFILE
  ftp> PUT rfile

On MPE/iX, RFILE or rfile is the same file name.

Transferring Files to a Different Directory


To transfer a file to other than the remote working directory, you can change directories using the CD command, or you can specify the directory name with the remotefile specified as in the following example (to a UNIX file system):

  ftp> PUT myfile testdir/myremfile
  200 PORT command okay.
  150 Opening data connection for testdir/myremfile
  226 Transfer complete.
  nnn bytes sent in n.nn seconds: (n.nn Kbytes/sec)

Transferring Files from Other Groups


The lcd command will change directories and consequently the group. For example, you could transfer a file named NSPROG1 from GROUP1 to a remote file named nsprog as follows:

  ftp> PUT NSPROG1.GROUP1 nsprog

If the remotefile is not specified in this example, the remote file name would be:

  NSPROG1.GROUP1

Transferring Multiple Files


To transfer a group of files to the remote system, use the FTP MPUT command.

For example, transfer all files in your account, beginning with the letter "C" to the remote host. First verify that the files are all of one type (ASCII or binary) using the MPE/iX LISTF command:

  ftp> :LISTF C@,1

  ACCOUNT=  PUB         GROUP=  MYGROUP

  FILENAME  CODE  ------------LOGICAL RECORD-------
                    SIZE  TYP        EOF      LIMIT

  CAT1               80B  FA         850      10000
  CAT2               80B  FA         800      10000
  CAT3               80B  FA         900      10000
  CAT4               80B  FA         700      10000

Transfer this group of ASCII files to the remote system:

  ftp> ASCII
  200 Type set to A.
  ftp> MPUT C@
  mput CAT1? Y
  200 PORT command okay.
  150 Opening data connection for CAT1 (15.13.132.120,63014).
  226 Transfer complete.
  nnn bytes sent in n.nn seconds: (n.nn Kbytes/sec)
  mput CAT2? Y

You are prompted whether or not (yes or no) to transfer each file in the selected group of files.

Pressing [Enter] at the prompt defaults to yes.To verify the files transferred:

  ftp> LS C*
  200 PORT command okay.
  150 Opening data connection for /bin/ls -1 (123.50.42.32,50895)
    (0 bytes). total nn

  CAT1
  CAT2
  CAT3
  CAT4

  226 Transfer complete
  nnn bytes sent in n.nn seconds (n.nn Kbytes/sec

Prompting


To transfer this group of files without prompting enabled, use the PROMPT command which turns interactive prompting on and off:

  ftp> PROMPT
  Interactive mode off. (FTPINFO 42)

Using Case


MPE/iX only supports uppercase file names. You can use the CASE command to force a group of files transferred with MPUT to lower case as follows:

  ftp> CASE
  Lower case on. (FTPINFO 43)
  ftp> MPUT C@
  200 PORT command okay.
  150 Opening data connection for cat1 (15.13.132.120,63018).
  226 Transfer complete.
  nnn bytes sent in n.nn seconds: (n.nn Kbytes/sec)


NOTE: The sequence of commands is repeated for each file transferred.

Check that the files transferred correctly:

  ftp> LS C@
  200 PORT command okay.
  150 Opening data connection for /bin/ls -1 (123.50.42.32,50895)
    (0 bytes). total nn

  Cat1
  Cat2
  Cat3
  Cat4

  226 Transfer complete
  nnn bytes sent in n.nn seconds (n.nn Kbytes/sec)




Transferring Files


Transferring Remote Host files to MPE/iX