中国DOS联盟

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

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

中国DOS联盟论坛
现在时间是 2026-07-07 07:09
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 字符串批量修改器 查看 858 回复 2
楼 主 字符串批量修改器 发表于 2008-08-07 21:06 ·  中国 江苏 无锡 电信
初级用户
积分 38
发帖 15
注册 2008-07-23 22:20
17年会员
UID 121971
性别 男
状态 离线
字符串批量修改,因为新人,不晓得论坛里有没有也不晓得有用否,权当尽力吧
基本用法: BINSUB 文件名 "旧字符串" "新字符串" /I
附件
BINSUB.rar (15.96 KiB, 下载次数: 18)
2 发表于 2008-08-07 22:45 ·  美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
跟change.exe相比,优势在哪里?
3 发表于 2008-08-08 12:50 ·  中国 北京 海淀区 联通
银牌会员
★★★
积分 1,287
发帖 634
注册 2007-05-02 15:06
19年会员
UID 87277
性别 男
来自 cmd.exe
状态 离线
可以替换不可显示的字符

BINSUB 2.1 (c)1999 by Peter Enzerink - pedro@bytepeople.com - FREEWARE

Syntax:
BINSUB {filename} @{oldfile}|{oldpattern} @{newfile}|{newpattern}

You may specify non-printing characters by using the pattern: '/nnn' where nnn
is a three digit decimal number. Strings including spaces may be wrapped by
double quotes following the DOS convention. You may also use '/032' to
represent a space. Use /I for a case insensitive search.

Also note that when using double quotes to delimit a parameter, if the new or
old pattern ends in a \, it should be represented as \\" rather than \" due to
\" being translated by DOS as a literal " rather than a delimiter.

You cannot search for a pattern containing '/nnn' since it will be interpreted
as a special character rather than a normal sequence of characters.
You could of course scan for '/047nnn' which would search for '/nnn'.

Return Codes:
1 Incorrect number of parameters 2 Unable to open input file
3 Unable to open output file 4 Unable to open {oldpattern} file
5 Unable to open {newpattern} file 8 Unable to allocate required storage
论坛跳转: