Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 100+ files in a directory named *.php5.

I would like to rename them all to *.php.

Is there a way to do this in Windows 7?

share|improve this question

In the regular command prompt:

ren *.php5 *.php
share|improve this answer

In powershell:

 dir *.php5 | ForEach-Object { move $_ $_.Name.TrimEnd('5') }
share|improve this answer

Ant Renamer is a fantastic renaming app. It's got a gui and can be run from the command-line. Plus it makes renaming images and mp3s a breeze.

And while you could just use ren as Stephen Jennings suggests. You could also bust out some old-school FOR loop fun--again in the regular command prompt.

FOR /f %i IN ('dir /b *.php5') DO rename %i %~ni.php
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.