GETFILE Get file from folder structure on local PC |
Top Previous Next |
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
|