I have a directory that will hold word docs of meeting minutes. The word doc titles will be "Minutes 1-21-2009.doc". I would basically I want the names to be "Minutes - 1-21-2009". Right now my code looks like:
For the glob, look into GLOB_BRACE (on the glob manual page if you want to look for multiple discrete possibilities (such as .doc and .docx). For the $no_ext line, you could call pathinfo($basename, PATHINFO_FILENAME) which will cut off the extension whatever it is.