本帖最后由 taofan712 于 2017-6-26 19:18 编辑
我来助你一臂之力- @echo off
- cd /d "%~dp0"
- setlocal enabledelayedexpansion
- echo;指定文件夹整理后的前缀
- set /p fre=
- set /a n=1000
- for /f %%a in ("%fre%") do (
- for /f "delims=" %%b in ('dir /b /ad') do (
- set /a n+=1
- ren "%%~b" "%%~a!n:~-3!"
- )
- )
- rem 先处理文件夹
- set n=0
- for /f "delims=" %%a in ('dir /b /ad') do (
- pushd %%a
- for %%b in (*.jpg) do (
- set /a n+=1
- ren "%%~b" %%~na-!n!%%~xb
- )
- set n=0
- popd
- )
- rem 遍历文件夹,处理其中的jpg
- for /f "delims=" %%a in ("%cd%") do tree /f "%%~a">mulu.txt
- echo;处理完毕&pause>nul&exit /b
- rem 最后tree父目录
复制代码
|