folder list

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
timle
Pro Scripter
Posts: 96
Joined: Tue Apr 20, 2004 5:53 am

folder list

Post by timle » Fri Apr 03, 2009 12:23 am

can someone tell me what is the command to list folders in a directory please

thanks

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Apr 03, 2009 12:32 am

Help wrote:GetFileList>filespec,result[,delimiter]

GetFileList returns a list of the files found matching the specified filespec. For instance, to return the list of files in the temp directory specify c:\temp\*.* as the filespec.

If delimiter is ommitted each filename is separated by a semicolon (;). Otherwise the filenames are separated by the delimiter specified.

By default GetFileList returns files. To return directories only set GFL_TYPE to 1 (Let>GFL_TYPE=1).

Abbreviation : GFL

Example

GetFileList>c:\temp\*.*,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%

Let>k=0
Repeat>k
Let>k=k+1
Message>file_names_%k%
Until>k,file_names_count

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts