Let us say that you want to rename all of your “.php5″ files to “.php†files. You can use for loop.