GETFILE         Get file from folder structure on local PC

Top  Previous  Next

Syntax:

GETFILE

[ file name ] [ /options ]

Arguments:

[ file name ]

Variable or string defining a file or path name to look for; wildcard characters allowed; if no path is defined

Options:

/incldirs

Descend into local folder(s) as they are found.

 

/newest

Get the newest file in the folder

 

/oldest

Get the oldest file in the folder.

 

/timeout=nn

Time-out in seconds to wait for presence of the file; if this option is omitted, Robo-FTP looks for the file and if nothing is found, $ERROR_NO_FILE_FOUND is returned; otherwise $ERROR_WAIT_TIMED_OUT is returned.

 

 

This script command checks for (and optionally waits for) the existence of a file defined by the [ file name ] argument. If a matching file is detected, its file name is saved in the %nextfile variable and its full path name is saved in the %nextpath variables. The date and time of the file are also saved in the %nextfiledate, %nextfiledatetime, and %nextfiletime variables. The size of the file, in bytes, is saved in the %nextfilesize variable.

 

This command is functionally equivalent to the GETNEXTFILE script command except for two important differences.

 

GETFILE has the capability to decend into and out of subfolders that it finds in a given folder tree (assuming the /incldirs option is specified) while GETNEXTFILE does not. (GETNEXTFILE returns folder names it finds in the %nextfolder script variable instead.)

 

Secondly, GETFILE does away with the /next option. GETFILE will always return the next file found when called repeatedly on the same folder structure when there are wildcard character(s) in [ file name ]. In the event that you wish to start over with the first matching file in the folder structure, issue the GETREWIND command and then resume issuing GETFILE.

 

Otherwise refer to the description of GETNEXTFILE for more details on this command.

 

Related Commands: GETREWIND