Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Directory structure
Message
 
To
09/07/2001 11:56:42
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00528118
Message ID:
00528175
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform