I have a php-application which is (per request) scanning for the existance of some files. (on a network share)
I\'m using glob for this, cause usually i jus
glob
I'm not sure if this is what you're looking for but i use scandir() to list all the files in a directory, then you can excecute any command on them once you know the name. It will work on open files as well
PHP scandir documentation source