* * Path to search in. * Filename to look for. * * (c) Marcus Boerger, Adam Trachtenberg, 2004 */ if ($argc < 3) { echo << Find a specific file by name. Path to search in. Regex for filenames to look for. EOF; exit(1); } class RegexFindFile extends FindFile { function accept() { return preg_match($this->file, $this->current()); } } foreach(new RegexFindFile($argv[1], $argv[2]) as $file) { echo $file->getPathname()."\n"; } ?>