本帖最后由 尘丶 于 2015-7-17 16:05 编辑
- setlocal enabledelayedexpansion
- set num=test00
- for /f "skip=1" %%a in ('wmic logicaldisk where "drivetype=3" get caption') do (
- set pan100=%%a
- set pan100=!pan100:~0,1!
- md d:\统计\!pan100!
- )
- for /f "skip=1" %%a in ('wmic logicaldisk where "drivetype=3" get caption') do (
- set pan=%%a
- set pan1=!pan:~0,1!
- for /l %%c in (1,1,10) do (
- if not %%c==10 (
- cd /d !pan!\!num!%%c
- ) else (
- cd /d !pan!\test010
- )
- for /f "delims=" %%d in ('dir /b /s *.txt') do (
- echo %%~dpnd
- if not %%c==10 (
- >>d:\统计\!pan1!\!num!%%c.txt echo %%~dpnd
- ) else (
- >>d:\统计\!pan1!\test010.txt echo %%~dpnd
- )
- )
- )
- )
- pause
复制代码 这段代码有提示系统找不到指定的路径。 求大神帮忙看看哪里错了。 |