Create a function that receive a path as parameter.
The first in the function get all folders in the received path. Loop through one at the time and call the function again with the new path (oldparg+folder name in loop).
After the folders find all files in the path and do your stuff.
Fast not tested code example:
FUNCTION findFiles
LPARAMETERS pcPath
LOCAL laFld(1), laFiles(1), lnFld, lnFiles
lnFld = ADIR(laFld, pcPath, "D")
DO WHILE lnFld > 0
IF "." # laFld(lnFld, 1) .AND. ".." # laFld(lnFld, 1) THEN
findFiles(ADDBS(pcPath)+laFld(lnFld, 1))
ENDIF
lnFld = lnFld - 1
ENDDO
lnFiles = ADIR(laFiles, ADDBS(pcPath)+"*.*")
ENDFUNC
>HI people(fox people)!!!
>I have to create a program that will receave the parameter(directory) in which it will check for files that have same filenames. And than put the names of this files into textfile. Well i'm using adir() command, but the problem is that it looks for the files in directory and its subdirs., but doesn't check the subdirs of subdirs...
> What do i have to do?
>Thank U.
HTH,
- Erik Niese-Petersen
Crazy Dane in USA.