I'm trying to find the best method of selecting .exe files within a directory, ignoring files inside other directories.
So far, I have the following:
$files = scandir('/path/to/dir');
Now, how can I remove "..", "." and other directories and files within that directory that are not .exe files?
Thanks.