ren *.aaaa.bbbb *.
For an explanation as to why this works, see How does the Windows RENAME command interpret wildcards?
Question
Ok, I know the typical format for the REN command REN source dest
and there are several examples to rename using wildcards.
Example:
REN *.txt *.doc
This will rename all your .txt files to .doc. Well, this is all fine and dandy, but I have a bunch of files with extensions .aaaa.bbbb and when I use the command:
REN *.aaaa.bbbb *.aaaa
I get all of my files with the extenstion .aaaa.aaaa. Now I cannot come up with a REN command to just get .aaaa extension.
Solution
ren *.aaaa.bbbb *.
For an explanation as to why this works, see How does the Windows RENAME command interpret wildcards?
OTHER TIPS
interesting question.
This removes the .bbbb
:
ren *.bbbb *.
I don't know, why the result is file.aaaa
and not file.aaaa.
- but nevertheless, it should solve your problem.