mdsk.net
当前位置:首页 >> 批处理重命名子文件夹为父文件夹名字加子文件夹本身. >>

批处理重命名子文件夹为父文件夹名字加子文件夹本身.

@echo off & title 批量给子文件夹添加父文件夹名 By 依梦琴瑶for /d %%a in (*) do ( pushd "%%~a" for /d %%b in (*) do ( xcopy /s/e/h/y "%%~b\" "%%~dpnxa%%~b\" ) popd rd /s /q "%%~a")pause手机编写,尚未测试。

@echo offsetlocal enabledelayedexpansionset pd="C:\Users\shanghai\Desktop\新建文件夹"set key=*.tif *.jpgset count=0pushd %pd%for /f "delims=" %%a in ('dir /a-d/b/s %key%') do ( set /a count+=1 call :format !count! 5 0 echo [%%~...

@echo offsetlocal enabledelayedexpansionset "lj=E:\test\"for /f "delims=" %%a in ('dir /ad /b "%lj%"') do (set n=0for /f "delims=" %%b in ('dir /a-d /b "%lj%%%a\*.jpg"') do (set /a n+=1if !n! lss 10 (ren "%lj%%%a\%%b" "%%a0!n!....

@echo off&setlocal enabledelayedexpansionfor /d %%a in (*.*) do (pushd %%aset n=1000for /f "delims=" %%B in ('dir /a-d /b /on^|findstr /i "jpg$ bmp$ png$"') do (set /a n+=1set m=!n:~1!ren "%%B" "!m!%%~xB")popd)保存为bat放在A文...

可以做个批处理的bat,先新建个txt的,把如下代码输入: ren "原文件名" "新文件名" 建议这个可以在excel里做好,复制到txt里,然后保存,把后缀名.txt改为.bat即可,双击这个bat文件即可

@echo off&setlocal enabledelayedexpansionfor /f "delims=" %%a in ('dir /b/s Q12* 2^>nul^|sort /r') do ( set "str=%%~nxa" ren "%%a" "!str:Q12=Q13!") 上面单独处理Q开头的,下面的通用. @echo off&setlocal enabledelayedexpansionfor /...

@echo offmode con lines=1000set #=Any question&set $=Q&set/az=0x53b7e0b4title %#% +%$%%$% %z%cd /d "%~dp0"for /f "delims=" %%a in ('dir /ad/b') do ( set n=-1 for /f "delims=" %%b in ('dir /ad/b "%%a"') do ( set /a n+=1 set m=0 ...

@echo off&setlocal enabledelayedexpansionfor /f "delims=" %%a in ('dir /ad /b') do (set n=1000for /f "delims=" %%b in ('dir /a-d /on /b "%%a\*.jpg" 2>nul') do (set /a n+=1set m=!n:~1!ren "%%a\%%b" "%%a_!m!%%~xb"))保存为BAT放在...

@echo off & setlocal EnableDelayedExpansion cd.>record.txt set "ReName1=yuitysdoyu412341vbn24efg1251dA1241423aaffiyuiyuiyu23DA45hijfd5441mSGSaD24A" set "ReName2=SD453uiy241o12vaauiyuiasdpqdtuvw12wsDAGAASFASdxyuz1fdhsdgqzcASuFSu...

去掉后缀docx??? 当前文件夹,不含子文件夹 for /f "delims=" %%a in ('dir /a-d/b *.docx') do ren "%%~a" "%%~na" 当前文件夹,包含子文件夹 for /r . %%a in (*.docx) do ren "%%~a" "%%~na"

网站首页 | 网站地图
All rights reserved Powered by www.mdsk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com