回复 3# 202048
如果不考虑2楼出现的状况的话:- @echo off
- setlocal enabledelayedexpansion
- set str1=文件名
- for /d %%a in (*) do (
- set str=%%a
- set str1=!str1!,%%a
- )
- (echo,!str1!
- for /f "delims=" %%i in ('dir /b /a-d "!str!\*.jpg"') do (
- set str2=%%i
- for /f "delims=" %%j in ('dir /s /b /a-d "%%i"') do (
- set str2=!str2!,%%j
- )
- echo,!str2!
- ))>Sum.csv
- pause
复制代码 批处理文件另存为ANSI编码,未测试。 |