After the information I received from Eric I decided to go back and rewrite it again making sure that it would not break existing code, this I have done (at least it should not if I've found all bugs). This routine follows the existing behaviour almost exactly except that it does not alter the strings sent to it. I added an extra bit to bypass recursion for patterns without wildcards but it really does not make much difference (I thought recursion was always slow but have been proved wrong) Some quick test results (for 1,000,000 calls) "thisisalongstring" - "thisisalongstring" 21.51 secs (orig) 2.48 secs (recursion) 1.77 sec (no recursion) "WINDOWS\File.ext" - "windows\fILE.EXT" 16.35, 2.23, 1.88 "windows\file.ext" - "WINDOWS/f*.ext" 7.69, 2.09, 1.85 "windows\file.ext" - "*.*" 6.98, 1.42, 1.45 "windows\file.ext" - "*.exy" 7.12, 1.48, 1.42 I am still working (at least I will when I can get back to it) to make it so it can optionally match in a more "Windows-like" way (path,name,ext) but most things can be handled by this "Unix-like" routine. I thought that if a pattern started with a semicolon I'd match for windows - that should not break anything and should cause no problems with older dll's (they'd just say could not find!). Hope this is of use. - Russell Peters