标题: [文本处理] 随机批处理的问题求助 [打印本页]
作者: shuaige100 时间: 2015-7-17 13:09 标题: 随机批处理的问题求助
本帖最后由 shuaige100 于 2015-7-17 13:11 编辑
- @echo off &setlocal enableDelayedExpansion
-
- for /f "tokens=1* delims=:" %%a in ('findstr/rvxc:" *" "1.txt"^|findstr/n .')do set "#%%a=%%b"&set/a n+=1
- set/a "c=%random%%%n+1"
- call set c=%%#%c%%%
- echo %c%
- for /f "tokens=1* delims=:" %%d in ('findstr/rvxc:" *" "2.txt"^|findstr/n .')do set "g%%d=%%e"&set/a n+=1
- set/a "f=%random%%%n+1"
- call set f=%%g%f%%%
- echo %f%
- for /f "tokens=1* delims=:" %%h in ('findstr/rvxc:" *" "3"^|findstr/n .')do set "i%%h=%%j"&set/a n+=1
- set/a "k=%random%%%n+1"
- call set k=%%i%k%%%
- echo %k%
- pause >nul
复制代码
第一个txt可以echo,2txt,很经常ECHO 处于关闭状态,3.txt直接echo %j了,如何修改呢?
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |