![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-10 16:55 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS疑难解答 & 问题讨论 (解答室) » Excuse me, experts, can the batch processing of multiple text files and multiple strings be realized under DOS? |
| Printable Version 2,122 / 7 |
| Floor1 power003 | Posted 2004-08-16 00:00 |
| 初级用户 Posts 14 Credits 88 | |
|
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!
|
|
| Floor2 Climbing | Posted 2004-08-16 00:00 |
| 铂金会员 Posts 2,753 Credits 6,962 From 河北保定 | |
|
Go search online; there are plenty of such tools. It seems this issue was also discussed in previous posts.
|
|
| Floor3 power003 | Posted 2004-08-16 00:00 |
| 初级用户 Posts 14 Credits 88 | |
|
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! |
|
| Floor4 power003 | Posted 2004-08-16 00:00 |
| 初级用户 Posts 14 Credits 88 | |
|
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!
|
|
| Floor5 Climbing | Posted 2004-08-16 00:00 |
| 铂金会员 Posts 2,753 Credits 6,962 From 河北保定 | |
|
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
|
|
| Floor6 power003 | Posted 2004-08-18 00:00 |
| 初级用户 Posts 14 Credits 88 | |
|
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!
|
|
| Floor7 Climbing | Posted 2004-08-18 00:00 |
| 铂金会员 Posts 2,753 Credits 6,962 From 河北保定 | |
|
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.
|
|
| Floor8 power003 | Posted 2004-08-18 00:00 |
| 初级用户 Posts 14 Credits 88 | |
|
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!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |