本文介绍了批量重命名文件扩展名,包括子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用此命令重命名空文件扩展名:
I'm renaming empty file extensions with this command:
rename *. *.bla
但是,我有一个包含数百个这样的子文件夹的文件夹,手动导航到每个子文件夹并运行它。
However, I have a folder with hundreds of such subfolders, and this command requires me to manually navigate to each subfolder and run it.
有一个命令,我可以从一个上层文件夹运行,将包括子文件夹中的所有文件? p>
Is there a command that I can run from just one upper level folder that will include all the files in the subfolders?
推荐答案
@echo off
for /f "tokens=* delims= " %%i in ('dir /b/s/A-d') DO (
if "%%~xi" == "" rename "%%~fi" "%%~ni.bla"
)
感谢@Wadih M.
Thanks @Wadih M. Find and rename files with no extention?
这篇关于批量重命名文件扩展名,包括子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!