문제

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.

도움이 되었습니까?

해결책

ren *.aaaa.bbbb *.

For an explanation as to why this works, see How does the Windows RENAME command interpret wildcards?

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top