当前位置:网站首页>Batch modify specified character file name bat script
Batch modify specified character file name bat script
2022-06-28 17:12:00 【flymore96】
@echo off
set /p str1= Please enter the file to replace ( Folder ) Name string ( Replaceable spaces ):
set /p str2= Please enter the replaced file ( Folder ) Name string ( Enter directly if deleted ):
echo.
echo In operation , Please wait a moment ……
for /f "delims=" %%a in ('dir /s /b ^|sort /+65535') do (
if "%%~nxa" neq "%~nx0" (
set "file=%%a"
set "name=%%~na"
set "extension=%%~xa"
call set "name=%%name:%str1%=%str2%%%"
setlocal enabledelayedexpansion
ren "!file!" "!name!!extension!" 2>nul
endlocal
)
)
exit
Create directly under the file to be modified .bat file , Put the above code in a file , Double click execute .
Reprint :https://blog.csdn.net/weixin_43042683/article/details/108453639
Actually measured feasible .
边栏推荐
- 基于Krack的网络攻击「建议收藏」
- 清华大佬耗时3天总结出的'常见网络协议汇总'
- 中国SSD行业企业势力全景图
- Problems encountered in local deployment conflict: MySQL database code, isolation level and verification code are not displayed
- Noip1998-2018 csp-s2 2019 2021 improvement group problem solving report and video
- Please ask me, the queries written in my database account for 99%. Is it better to use pay as you go mode or reservation mode?
- 如何登录到你的 WordPress 管理仪表板
- Improving observability - business indicator monitoring practice
- 知乎热问:一个程序员的水平能差到什么程度?
- 12 SQL optimization schemes summarized by old drivers (very practical)
猜你喜欢
Redis持久化(少年一贯快马扬帆,道阻且长不转弯)
「杰伦熊」暴跌96.6% 明星带货NFT为何遇冷?
'summary of common network protocols' summarized by Tsinghua leaders in 3 days
Practice of curve replacing CEPH in Netease cloud music
解决sqoop出现 ERROR manager.SqlManager: Generic SqlManager.listDatabases() not implemented
Improving observability - business indicator monitoring practice
Tianyi cloud web application firewall (edge cloud version) passed the first batch of trusted authentication
抓取手机端变体组合思路设想
Log management in MySQL log backup and recovery
基数排序——【常见排序法(2/8)】
随机推荐
【TcaplusDB知识库】查看业务密码
Noip2011-2018 problem solving report of improvement group
大促场景下,如何做好网关高可用防护
高并发、高可用、弹性扩展,天翼云护航企业云上业务
'summary of common network protocols' summarized by Tsinghua leaders in 3 days
Sum of factor numbers of interval product
IP problem occurs when a virtual system is cloned in VirtualBox
AutoSAR 软件开发培训
Practice of curve replacing CEPH in Netease cloud music
After the first failure, AMEC rushed to the Hong Kong stock exchange for the second time, and the financial principal changed frequently
Noip1998-2018 csp-s2 2019 2021 improvement group problem solving report and video
免费、强大、高颜值的笔记软件评测: OneNote、Heptabase、氢图、FlowUs
Learning process summary of ARM9 development [easy to understand]
BOM in JS
55. 连续子数组的最大和
np tips: random 创建随机矩阵 sample = np.random.random([19, 64 , 64, 3])
Potplayer plays Baidu cloud disk video
天翼云Web应用防火墙(边缘云版)通过首批可信认证
opencv 读取图片详解
Can Huawei become a "brother of lipstick" or a "Queen of goods"?