DIR (List Directory Entries, Libraries, or Files)

 

The DIR i5/OS® FTP client subcommand displays libraries and their contents or the remote system's list of directories and directory entries.

 

FTP client subcommand

DIr [ name] [(Disk]

name

The name of the directory or library. The default is the entire current directory or library. To make a library or directory current, use the Change Working Directory (CD) subcommand. How you specify a set of remote files depends on the system. Most systems allow a generic asterisk, (*). For example, if the remote system is a System i™ product, DIR MYLIB/MYFILE. * produces a list of all members of MYFILE in library MYLIB.

There are two possible file name formats you can use. The example shown here uses NAMEFMT 0. For information about FTP file naming, see NAMEFMT (Select File Naming Format).

(Disk

Stores the results of the DIR subcommand in the file * CURLIB/DIROUTPUT.DIROUTPUT, instead of showing the results on the display.

If the remote system is a System i product, the information includes:

Use the DIR subcommand with caution. If you enter the DIR subcommand without any parameters, the server produces a listing of all the current directory files. This might be a much longer list than you want.

To get a list of the file names in a directory, use the List (LS) subcommand.

Related reference
CD (Change Working Directory or Library) LS (List Remote File Names) File Transfer Protocol client syntax conventions