1

Possible Duplicate:
windows rename command to rename file.a.b to file.b

I have a few folders with hundreds of html files. The file name should have been .htm but it is .asp.htm and it does not run. It is plain html file and there is no asp code.

So, I tried to rename the files using rename command. I tried like this:

rename *.asp.htm *.htm

But it does not work. After trying a few other combinations I believe rename or ren command can't change the double dot extension. The only change the last extension. So, if I try:

rename *.asp.htm *.asp.htm

I thought nothing would be changed, but the file name changes from file.asp.htm to file.asp.asp.htm

I hope someone would help me with this. Another thing is: can I force apache to run files with .asp.htm extension?

3
  • 1
    This is not a programming question. SuperUser is a better venue. – Raymond Chen Oct 31 '12 at 4:05
  • Don't, this question will be migrated. – mnel Oct 31 '12 at 4:25
  • Sorry, But I already asked there. What should I do now? – sakibmoon Oct 31 '12 at 4:37
2

You can do it with two ren instances:

ren *.asp.htm *. (this will change the extension to .asp)

And after:

ren *.asp *.htm

0

There are some file renaming softwares available for free. Try them. Some of them I'll suggest you is BullRenameUtility and Multi File Renamer

1
  • 1
    I believe my problem can be solved with a single rename command. So, I don't really want to try them. Thanks anyway. They might come in handy in future. – sakibmoon Oct 31 '12 at 4:36

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