Symfony comes bundled with the sfFinder class that lets you conveniently search for files and directories. It has a simple fluent interface that lets you tell what you’re looking for and where to look for it:

But, come to think about it, this would be way more efficient in a form of one-liner and two screenshots. It is a one-liner and two screenshots (before and after), maybe three (a screenshot of the directory), would be quite enough.