Archive: Locate all Files


Locate all Files
Hallo,

I need help:
I have this code:

StrCpy $x 0
${While} $x < 10
IntOp $x $x + 1
${Locate} "C:\" "/L=F /M=*.*" "Stopsearch"
MessageBox MB_OK $FILEPATH
${Endwhile}

Function Stopsearch
StrCpy $FILEPATH $R9
StrCpy $R1 StopLocate
Push $R1
Functionend


i want to have all files of a folder.
But my problem is that i only get the first file in this folder every time. How can i get the next files of a folder.

And how can i stop the loop when all files were found???


thanks for help


Just use FindFirst, FindNext and FindClose if you want to get files in a single folder. Locate is only necessary if you need to find files and folders recursively.

Stu