Do you prepare to use another function than glob()? You can try to use SPL's recursive iterators if it will find an opened file that's located on a drive that's using Windows Server 2012 R2 build in data-deduplication feature. You can find an example how you can use it from this link.