本帖最后由 pcl_test 于 2016-7-3 14:39 编辑
- @echo off
- setlocal enabledelayedexpansion
- rem for %%a in (*.txt) do ……
- for /f "delims=" %%a in ('dir /a-d/b *.txt') do set "#!random!%%~na=%%a"
- call :loop
- pause&exit
- :loop
- for /f "tokens=1* delims==" %%a in ('set #') do (
- set /p str=<"%%b"
- if defined str (
- if "!str: =!" neq "" (
- for /l %%i in (0,1,8190) do if "!str:~%%i,1!" neq "" echo;!str:~%%i,1!
- )
- )
- goto :eof
- )
复制代码
|