cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jeffrey_l_hucki
Level 2

FindAllFiles function checks subdirectories - bad thing

I need to use FindAllFiles in my InstallScript project to add executables to the Windows Start Programs Menu since the executables are not known at design time because they are in a component with a dynamic link to a source folder.

The problem is that I ONLY want TARGETDIR to be searched for the files, but it searches all subfolders under TARGETDIR. What is even MORE bizarre is that FindAllFiles doesn't even find the executables in TARGETDIR. It only finds the ones in the subfolders.

HELP!!!
Labels (1)
0 Kudos
(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The FindAllFiles function is documented as searching all subdirectories in the path provided to the function. To search for files only in a specific path and not in subdirectories, use the FindFile function.
0 Kudos
tyler5
Level 3

I think that the OP's request is to get all files in one directory, not including subdirectories? FindAllFiles needs to be put in a loop with some folder checking to make this work. It's not an ideal option, but it does work.

This thread covers the issue:
How to get all files in one directory, not including subdirectories?
0 Kudos