本帖最后由 再世情緣 于 2016-2-14 19:36 编辑
回复 9# 6232333
在别人的基础上修改的,测试可用- @echo off & setlocal enabledelayedexpansion
- set /a "count=0"
- call :fuc %1
- call :fuc %2
- call :fuc %3
- call :fuc %4
- call :fuc %5
- call :fuc %6
- call :fuc %7
- call :fuc %8
- call :fuc %9
- echo 处理了 !count! 个文件夹......&pause
- goto :eof
- :fuc folder
- if "#%1#" EQU "##" goto :eof
- set "att=%~a1" &&set "att=!att:~,1!"
- set "var=%~f1"
- if /i "#!att!#" EQU "#d#" (
- cd /d "!var!" >"!var!\当前文件夹清单.txt"
- for /f "delims=" %%A in ('dir /b /a +d "*" 2^>nul') do (
- set "att1=%%~aA" &&set "att1=!att1:~,1!"
- if /i "#!att1!#" EQU "#d#" (echo.%%~nA)>>"!var!\当前文件夹清单.txt"
- )
- set /a "count+=1"
- )
- goto :eof
复制代码
- @echo off & setlocal enabledelayedexpansion
- set /a "count=0"
- call :fuc %1
- call :fuc %2
- call :fuc %3
- call :fuc %4
- call :fuc %5
- call :fuc %6
- call :fuc %7
- call :fuc %8
- call :fuc %9
- echo 处理了 !count! 个文件夹......&pause
- goto :eof
- :fuc folder
- if "#%1#" EQU "##" goto :eof
- set "att=%~a1" &&set "att=!att:~,1!"
- if /i "#!att!#" EQU "#d#" (
- dir /b /a -d "%~f1\*.jpg" 2>nul >"%~f1\当前JPG文件清单.txt"
- set /a "count+=1"
- )
- goto :eof
复制代码
|