|  | scanFolder 
At 08:11 14.01.99 -0600, Danny Sheives wrote:
>
>*********************
>on getFileList thePath
>  set fileList = []
>  if thePath = void then
>    set thePath = the pathname
>  end if
>  repeat with i = 1 to the maxInteger
>    set thisFile to getNthFileNameInFolder(thePath, i)
>    if thisFile = EMPTY then return fileList
>    else
>      append(fileList,thisFile)
>    end if
>  end repeat
>end
>
>*********************
>
If using BudApi is an option, I'd recommend something like
on getFilesInFolder aFolderPath, aMask
  if voidP(aFolderPath) then set aFolderPath = the moviepath
  if voidP(aMask) then set aMask = "*.*"
  set Files = baFileList( aFolderPath,aMask  )
  
  return Files
end
for speed reasons. On one occasion baFileList() tested 15 times faster than 
its getnthFileinFolder() equivalent.
 |