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:
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.
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:
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:
ACCOUNT = PUB GROUP = MYGROUP] |
FILENAME CODE -----------LOGICAL RECORD----------- |
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) |