@echo off
set num=100000
REM for /L %%i in (1,1,%num%) do echo "here is %%i"
if not exist tmp mkdir tmp
REM ~ for /L %%i in (1,1,%num%) do touch "tmp/abc%%i.txt"
for /L %%i in (1,1,%num%) do echo "abc%%i" > "tmp/abc%%i.txt"
for /L %%i in (1,1,%num%) do mkdir tmp"abc%%i"
dir/b/s tmp > tmp.txt
for /F "usebackq delims==" %%i in (`dir/b/s tmp`) do @echo %%i
for /F "usebackq delims==" %%i in (`dir/b/s tmp`) do @del/s/q %%i
for /F "usebackq delims==" %%i in (`dir/b/s tmp`) do @rmdir/s/q %%i
@echo on
纯粹为了作实验使用的,有兴趣的可以一试。使用python之类的,也会很简单。批处理有时候用起来也还是蛮方便的。
阅读(1964) | 评论(0) | 转发(0) |