LISTDIR        List local folder to a file

Top  Previous  Next

Syntax:

LISTDIR

[ dir name ]  [ file name ]

Arguments:

[ dir name ]

Optional variable or string defining a folder path name to list; if no path is defined Robo-FTPs working folder is used.

 

[ file name ]

Optional variable or string defining a file name to write the folder listing to; if no path is defined Robo-FTP writes to a file named "dirlist.txt" in the working folder.

 

 

This script command produces a folder listing of Robo-FTP's working folder or a specified folder and writes it to a file. If [ file name ] is not specified, Robo-FTP creates a file in the working folder named "dirlist.txt". The folder format written to this file is the same as might be produced using the dir command in a DOS window.

 

This command is useful in creating a folder listing file. Consider the following example where a listing file of a folder is created and sent to a remote site:

 

LISTDIR "\uploads\*"

SENDFILE "dirlist.txt"

 

To get a listing of the current directory on a remote site, use the FTPLIST script command.

 

Related Command(s): MAKEDIR, WORKINGDIR, FTPLIST