重命名子目录中的文件 [英] Rename files in sub directories

查看:169
本文介绍了重命名子目录中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



示例:

重命名*。 html to * .htm in a directory which have directories and sub directories。

解决方案

Windows命令提示符,将%x更改为%% x)
$ b $ pre $ for / r%x in(* .html)do ren%x * .htm

这也适用于重命名文件的中间部分

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


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

Example:

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

解决方案

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

这篇关于重命名子目录中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆