<< back to sysax.com Product page

4.3.2. List contents of multiple remote directories

The mdir Displays a list of a remote directory's files and subdirectories. Mdir allows you to specify multiple files. This command is to follow by the parameter are 'remote-files and local-files'. The remote-files specifies the directory for which you want to see a listing. Remote-files must be specified; type "-" to use the current working directory on the remote computer and the local-files specifies a local file to store the listing. Type "-" to display the listing on the screen.

The Syntax is

Exhibit 4.11. Syntax of "mdir" command

 mdir remote-files [,,,] local-file  

The example is

Exhibit 4.12. Example of "mdir" command

 ftp> mdir 

 Remote files 2007sep22.txt
 Local file command.txt
 output to local-file: command.txt?
 200 Command okay
 150 File status okay; about to open data connection
 226 Closing data connection
 ftp: 332 bytes received in 0.03Seconds 10.71Kbytes/sec.