It doesn't matter what is stored in laFileList array before call to ADIR() because it'll be resized, if necessary, and filled by ADIR(). I doubt that line with ADIR() can generate the "Invalid Subscript Reference" error. Are you sure about that?
What VFP version are you using?
>I am using your _CDIR function, but I keep getting an "Invalid Subscript Reference" on the following line of the LoadOneDir function :
>
>lnFiles = ADIR(laFileList, tcPath + "*.*", lcAttributes, tnFlag)
>
>It seems like laFileList is sent to .f., and I can't figure out why. Thanks Sergey!
>
--sb--