up vote 1 down vote favorite
1
share [g+] share [fb]

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?

link|improve this question

70% accept rate
feedback

3 Answers

In the regular command prompt:

ren *.php5 *.php
link|improve this answer
feedback

In powershell:

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

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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