|
|
楼主 |
发表于 2010-7-4 23:29:11
|
显示全部楼层
你好,版主,不好意思我确实一开始 写错了,多了个bc,对不起哦.让大家理解错了!
我第一段的意思是
a
b
c
这样随机取a b c 放置title之间
当前需求是abc 的排列组合放置title之间
比如
<title>abc</title>
<title>ab</title>
<title>ac</title>
<title>bc</title>
麻烦帮我整合一下bat,就是把- set "prefix=<title>"
- set "suffix=</title>"
- cd /d "C:\Documents and Settings\Administrator\桌面\新建文件夹"
- for /f "delims=" %%a in ('dir /a-d/b *.html') do (
- set file=%%a
- setlocal enabledelayedexpansion
- set /a n=!random!%%n+1
- (
- for %%a in (!n!) do echo;!prefix!!.%%a!!suffix!
- more "!file!"
- ) > "%temp%\~tmp"
- move "%temp%\~tmp" "!file!"
- endlocal
- )
- pause
复制代码 结合起来,谢谢! |
|