How do I rename files in sub directories?

前端 未结 15 1481
臣服心动
臣服心动 2020-12-04 11:10

Is there any way of batch renaming files in sub directories?

For example:

Rename *.html to *.htm in a folder which has directories

15条回答
  •  孤街浪徒
    2020-12-04 11:50

    Windows command prompt: (If inside a batch file, change %x to %%x)

    for /r %x in (*.html) do ren "%x" *.htm
    

    This also works for renaming the middle of the files

    for /r %x in (website*.html) do ren "%x" site*.htm
    

提交回复
热议问题