Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search entire drive for a file
Message
De
02/03/2003 14:30:27
 
 
À
28/02/2003 15:29:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00759634
Message ID:
00760161
Vues:
21
That did the trick. Thanks Alan!
Tracy
SET TALK OFF
SET SAFETY OFF
CLEAR
ltStart = DATETIME()
x=1
CREATE CURSOR foundfiles ( cFilename c(80), nSize N(10), dMod d )

lcFile="archeadr.dbf"

IF !WEXIST('mywin')
	DEFINE WINDOW mywin FROM 1,1 TO 20,70 TITLE "Searching..." FONT 'Arial',8 IN SCREEN 
ENDIF

WAIT WINDOW "Searching for "+lcFile+"..." NOWAIT NOCLEAR

ACTIVATE WINDOW mywin
RecurseFolder( "\" )

ltFinish=DATETIME() - ltStart

INDEX ON nSize TAG nSize

? "Finished."
IF WEXIST('mywin')
	RELEASE WINDOWS mywin
ENDIF
*browse nowait

WAIT CLEAR
RETURN


FUNCTION RecurseFolder( lcDir )
	LOCAL i,N, laFiles[1]

	*?? "."
	N = ADIR( laFiles, lcDir + "*.*", "shd" )

	FOR i = 1 TO N
		IF ( LEFT( laFiles[i,1], 1 ) != '.' )
			IF ( "D" $ laFiles[i,5] )
				mydir=ALLTRIM(LOWER(lcDir+laFiles(i,1)))
				IF LEN(mydir)>ROUND(WCOLS(),0)
				    mydir="..."+RIGHT(mydir,LEN(mydir)-(LEN(mydir)-(ROUND(WCOLS(),0)-15)))
				ENDIF
				? mydir
				RecurseFolder( lcDir + laFiles[i,1] + "\" )
			ELSE
				IF TYPE('lafiles(i,1)')="C" .AND. UPPER(lcFile) $ UPPER(laFiles(i,1))
					INSERT INTO foundfiles ;
						VALUES( lcDir + laFiles[i,1], laFiles[i,2], laFiles[i,3] )
				ENDIF
			ENDIF
		ENDIF
	ENDFOR
	RETURN
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform