Archive: DirectoryRequest Filter?


DirectoryRequest Filter?
what's the best way to filter files from InstallOptions' DirectoryRequest feature? in my script the user must select a directory, but instead of reading all the files, i need to restrict this (to avoid including wrong files, to make it idiot-proof). can i add a function to check for the filetypes in the directory and allow only two or more certain types? what would such a function look like?


You'd have to use FindFirst, FindNext and FindClose to make sure the directory doesn't contain the files you don't want in it. Put it in the leave function of the IO page.