Transfer files with File Transfer Protocol

You can send and receive files with File Transfer Protocol (FTP).

Follow these steps to transfer files with FTP.
  1. Collect the following information:
    • The TCP/IP name or IP address of the remote computer
    • A logon name and password for the remote computer (unless the remote computer supports anonymous FTP)
    • The name and location of the file you want to transfer
    • The location of the destination
    • The file transfer type that you use: ASCII, EBCDIC, or BINARY
    • Whether you want to use a connection secured with Transport Layer Security (TLS) or Secure Sockets Layer (SSL).
  2. At the command line, type FTP and press Enter.
  3. At the prompt, enter the TCP/IP name or IP address of the remote computer system and press Enter. You can use either the name or the IP address, such as:

    remote.systemname.com
    or
    110.25.9.13

  4. Enter the Coded Character Set Identifier (CCSID). Use the default (*DFT) value unless you know that you need a specific CCSID.
  5. If you want to use a secure connection to protect passwords and data, specify a Port value of *SECURE.
  6. Press Enter to initiate the connection. The FTP client displays messages that indicate a successful connection with the remote system.
    Note: If you specify a port of *SECURE and the server does not support implicit TLS or SSL on the specified port, or the TLS or SSL negotiation fails for any reason, the connection is closed.
  7. To change the file transfer type, complete the following steps:
    1. To switch to EBCDIC, enter EBCDIC and press Enter before you transfer the file.
    2. To switch to BINARY, enter BINARY and press Enter before you transfer the file.
    3. To switch back to the default type, ASCII, enter ASCII and press Enter before you transfer the file.
  8. Now you are ready to transfer files:
    1. Enter CD and the name of the directory. Press Enter.
    2. Do one of the following steps:
      • To transfer a file from the server system to the client system, enter GET followed by the name of the file:
        GET myfile.txt
      • To send a file that is on the client system to the server system, enter PUT followed by the name of the file:
        PUT myfile.txt
  9. Enter the FTP subcommand QUIT to end the FTP client session and return to the iSeries™ command line.
Related concepts
Data transfer methods
Related reference
Start and stop a client session
Related information
Scenario: Transfer a file from a remote host