Next: , Previous: Aborting A File Transfer, Up: ftp invocation


8.3 File Naming Conventions

Files specified as arguments to ftp commands are processed according to the following rules.

  1. If the file name ‘-’ is specified, standard input (for reading) or standard output (for writing) is used.
  2. If the first character of the file name is ‘|’, the remainder of the argument is interpreted as a shell command. ftp then forks a shell, using popen with the argument supplied, and reads/writes from standard input/output. If the shell command includes spaces, the argument must be quoted; e.g. ‘"ls -lt"’. A particularly useful example of this mechanism is ‘dir more’.
  3. Failing the above checks, if globbing is enabled, local file names are expanded according to the rules used in the csh; c.f. the glob command. If the ftp command expects a single local file (e.g. put), only the first filename generated by the globbing operation is used.
  4. For mget commands and get commands with unspecified local file names, the local filename is the remote filename, which may be altered by a case, ntrans, or nmap setting. The resulting filename may then be altered if runique is on.
  5. For mput commands and put commands with unspecified remote file names, the remote filename is the local filename, which may be altered by a ntrans or nmap setting. The resulting filename may then be altered by the remote server if sunique is on.