Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directory structure
Message
 
À
09/07/2001 11:56:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00528118
Message ID:
00528175
Vues:
18
Try something like this: FindFile( 'notepad.exe', 'c:\' )
function FindFile
lparameters cFile, cPath

local i, nFiles, aFiles[1], cRetVal
nFiles = adir( aFiles, cPath + "*.*", "D" )
cRetVal = ''

for i=1 to nFiles
	
	if "D" $ aFiles[i,5]
		if aFiles[i,1] != "." and aFiles[i,1] != ".."
			cRetVal = FindFile( cFile, cPath + aFiles[i,1] + "\" ) && recursive call
			if not empty( cRetVal )
				exit
			endif					
		endif
	else
		if aFiles[i,1] = cFile
			cRetVal = cPath 
			exit
		endif
	endif	
		
next
	
return cRetVal
>Not really.
>
>I want a program to get me all sub-directories in a specified folder, and all subfolders in each subfolder and so on.
>
>Kev
Hector Correa
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform