Getting list of files in a folder

Jim Ault jimaultwins at yahoo.com
Tue Feb 9 00:24:26 EST 2010


On Feb 8, 2010, at 9:05 PM, Mark Swindell wrote:

> How do I return a list of the files in a given folder on disk along  
> with their full path?



I assume you mean on a local drive vs network drive.

Step one is to use the full path to tell Rev where to look to generate  
the list of files,

..so one technique I use is

answer folder "choose your target folder"
put it into tFullPath
set the defaultFolder to tFullPath
put the files into tFileList
filter tFileList without ".*" -- invis files

(or put the detailed files into tFileList )

repeat for each line tFileName in tFileList
   put tFullPath & "/" & tFileName & cr after newFileLIst
end repeat

filter newFileList without empty


Jim Ault
Las Vegas






More information about the Use-livecode mailing list