here is an example on how to list only the files in a folder (with out having to use the LEN command

You do not have to worry about directory entries like"." or ".." or any other directory listing that may exist in the folder.

code:

$Folder = "c:\"

;set the initial DIR() pointer
$return = dir($folder + "*.*")

? "Now listing all files in " + $folder
while @error = 0

;this will only be true for files, to list only folders set it to equal 16
IF (getfileattr($folder + $return) & 16) = 0
? $return
endif

;get the next item in the folder
$return = dir()
loop


Bryce