Board logo

标题: [求助]求可以修改文本指定内容的批处理 [打印本页]

作者: yxzpt     时间: 2008-8-6 12:01    标题: [求助]求可以修改文本指定内容的批处理

文本内容如下: POST /AddEvaluation HTTP/1.1 Accept: text/javascript, text/html, application/xml, text/xml, */* Accept-Language: zh-cn x-prototype-version: 1.6.0 Referer: yhnrne.vicp.net ... x-requested-with: XMLHttpRequest Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) Host: yhnrne.vicp.net Content-Length: 270 Connection: Keep-Alive Cache-Control: no-cache Cache: infotree_DJGH370=749D03; JSESSIONID=FD2CF8E2A05B50D0CC8EE75D028A8204.AppSer2BTomcat msgId=170422&satisficationStar=3&serviceQuality=50&professionLevel=50&responseLevel=50&servicePrice=50&preVisitTime=1&revist=1&evaluation=%E5%8F%91%E5%B8%83 求个批处理,每运行一次,将文本的红色数字每次+1(或者-1也行),谢谢! 就是运行一次后,170422变成170423,再运行一次,变成170424

作者: yxzpt     时间: 2008-8-7 09:56
顶一下

作者: yxzpt     时间: 2008-8-9 16:53
继续求

作者: lxmxn     时间: 2008-8-9 17:04
没什么难的,建议你找个 sed ,用sed的正则找出这个数字,提取出来,再做运算。

作者: yxzpt     时间: 2008-8-9 18:22
就是不会才来求的

作者: lxmxn     时间: 2008-8-9 19:20
不是跟你说了方法了吗?

作者: HAT     时间: 2008-8-10 00:13
@echo off
for /f "tokens=2 delims==&" %%a in (a.txt) do set NumNow=%%a
set /a NumNext=%NumNow%+1
change a.txt /from %NumNow% /to %NumNext% /in msgId=
change.exe http://upload.cn-dos.net/img/427.zip