HP ARPA File Transfer Protocol User's Guide
> Chapter 4 Using FTPTransferring MPE/iX Files to the Remote Host |
||||||||||||||||||||||||||||
|
ftp> PUT localfile remotefileThe 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 localfileIf the localfile is not a valid file name on the remote system, the file transfer fails.
File NamingNote 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 rfileOn MPE/iX, RFILE or rfile is the same file name. Transferring Files to a Different DirectoryTo 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 GroupsThe 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 nsprogIf the remotefile is not specified in this example, the remote file name would be: NSPROG1.GROUP1 Transferring Multiple FilesTo 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 10000Transfer 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? YYou 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 PromptingTo 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 CaseMPE/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)
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)
|