Mass rename of file extensions recursively (windows batch)

后端 未结 3 1488
灰色年华
灰色年华 2021-02-02 11:17

I have numerous files in a very complex directory structure, and for reasons not worth discussing I need to rename all files with the extension of \".inp\" to have \".TXT\" exte

3条回答
  •  逝去的感伤
    2021-02-02 12:08

    John Smith's answer is excellent, and it works. But to be completely clear (I had to re-read magoo's notes to figure out the correct syntax), here is exactly what you need to do...

    BATCH FILE:
    FOR /R %%x IN (*.js) DO ren "%%x" *.txt
    
    COMMAND LINE:
    FOR /R %x IN (*.js) DO ren "%x" *.txt
    

    Up vote their responses, I am but a lowly formater...

提交回复
热议问题