China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-22 12:01
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Excuse me, experts, can the batch processing of multiple text files and multiple strings be realized under DOS? View 2,032 Replies 7
Original Poster Posted 2004-08-16 00:00 ·  中国 香港 中信国际电讯
初级用户
Credits 88
Posts 14
Joined 2004-08-02 00:00
21-year member
UID 29494
Gender Male
Status Offline
The files to be replaced will be stored in a directory, and they are of the text file type. Each time the content to be replaced is the same. Thanks to all the experts!
衷心感谢您的帮助,我也会真心帮助大家!
Floor 2 Posted 2004-08-16 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
Go search online; there are plenty of such tools. It seems this issue was also discussed in previous posts.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 3 Posted 2004-08-16 00:00 ·  中国 香港 电讯盈科
初级用户
Credits 88
Posts 14
Joined 2004-08-02 00:00
21-year member
UID 29494
Gender Male
Status Offline
It's still Master Climing who answers my question, very touching!
I have looked for many tools in this regard, but none of them work well, and the other parts of my program were completed under DOS, so I still want to find a solution under DOS.
Thank you!
衷心感谢您的帮助,我也会真心帮助大家!
Floor 4 Posted 2004-08-16 00:00 ·  中国 香港 电讯盈科
初级用户
Credits 88
Posts 14
Joined 2004-08-02 00:00
21-year member
UID 29494
Gender Male
Status Offline
I saw the previous discussed posts, and I'll study them first. The content I need to find and replace is fixed each time. If the experts have better tricks, please give me some advice!
衷心感谢您的帮助,我也会真心帮助大家!
Floor 5 Posted 2004-08-16 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
You're welcome, I'll definitely help if I can. The user who is incorrigible has been using a change.exe to perform these text find and replace operations. I just looked at the instructions for this command, and it directly supports multi-file find and replace operations by itself (it only supports strings, it seems it doesn't support binary). Also, it can be achieved by combining the for command in batch processing with change.exe. Fortunately, the content you're replacing is fixed, so it should be relatively easy to implement. Below I provide the download of this command: Click to download Change.exe (version 2002.08, 92K) This is the official homepage of this program: http://users.erols.com/waynesof/bruce.htm
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 6 Posted 2004-08-18 00:00 ·  中国 香港 中信国际电讯
初级用户
Credits 88
Posts 14
Joined 2004-08-02 00:00
21-year member
UID 29494
Gender Male
Status Offline
Thanks a lot, Master Climing! My problem has been solved! There are a few commands that can save us a lot of manual labor! Because the problem I need to solve is very simple, just changing the same characters in the same file each time. The command used is as follows: change d:\directory\*.txt /from "***" /to "****" and it's all done! Thanks again, CLIMING!
衷心感谢您的帮助,我也会真心帮助大家!
Floor 7 Posted 2004-08-18 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
You're welcome. Writing a good post with a clear title and complete content without typos is the greatest reward for me. Also, I checked the documentation of change.exe, and it also supports binary search and replace. But it doesn't seem to support regular expressions.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 8 Posted 2004-08-18 00:00 ·  中国 香港 电讯盈科
初级用户
Credits 88
Posts 14
Joined 2004-08-02 00:00
21-year member
UID 29494
Gender Male
Status Offline
I still don't quite understand the essential difference between strings and binary. I replaced the text files in BIG5, and it works very well! When making batch processing, I did it in the BIG5 environment using Notepad! Everyone, look how cute CLIMING is. The requirement for everyone is just "clear title, complete content, no typos". I think everyone who really wants to learn something can do it!
衷心感谢您的帮助,我也会真心帮助大家!
Forum Jump: