renaming multiple files (bash)

I had to rename many .phtml files, so that their extension will change to .php. This does the trick:


for i in *.phtml; do mv $i ${i%.phtml}.php; done

Leave a Comment

You must be logged in to post a comment.