中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-06 12:44
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [求助]修改文本文件的字符串问题 查看 643 回复 3
楼 主 [求助]修改文本文件的字符串问题 发表于 2007-11-20 19:24 ·  中国 广东 梅州 电信
中级用户
★★
积分 421
发帖 111
注册 2003-08-29 00:00
22年会员
UID 9153
性别 男
状态 离线
修改搜狗拼音的配置文件env.ini,需要将里面的PageSize=5修改为PageSize=9,请问如何些批处理解决?

if exist "%UserProfile%\Application Data\SogouPY\env.ini" goto copy /y "%systemdrive%\install\soft\env.ini" "%UserProfile%\Application Data\SogouPY\" 这个语句为什么会出现copy不能执行?
2 发表于 2007-11-20 19:32 ·  中国 北京 中国科学院研究生院玉泉四公寓
银牌会员
★★★
积分 1,187
发帖 555
注册 2006-12-21 07:35
19年会员
UID 74129
性别 男
状态 离线
Originally posted by ronin at 2007-11-20 19:24:
修改搜狗拼音的配置文件env.ini,需要将里面的PageSize=5修改为PageSize=9,请问如何些批处理解决?

if exist "%UserProfile%\Application Data\SogouPY\env.ini" goto copy /y "%systemdrive%\install\soft\env.ini" "%UserProfile%\Application Data\SogouPY\" 这个语句为什么会出现copy不能执行?


goto 后面不对吧~~~

换成:

if exist "...... " call :mod
...
eixt/b

:mod
copy /y .....
3 发表于 2007-11-20 19:38 ·  中国 广东 梅州 电信
中级用户
★★
积分 421
发帖 111
注册 2003-08-29 00:00
22年会员
UID 9153
性别 男
状态 离线
昏,犯了超级弱智问题,大概今天忙昏了头
多了个goto
if exist "%UserProfile%\Application Data\SogouPY\env.ini" copy /y "%systemdrive%\install\soft\env.ini" "%UserProfile%\Application Data\SogouPY\"
4 发表于 2007-11-20 19:40 ·  中国 北京 中国科学院研究生院玉泉四公寓
银牌会员
★★★
积分 1,187
发帖 555
注册 2006-12-21 07:35
19年会员
UID 74129
性别 男
状态 离线
嘿嘿~~~
论坛跳转: