|
power003
初级用户
 
积分 88
发帖 14
注册 2004-8-2
状态 离线
|
『楼 主』:
请问高手们,在DOS下能否实现对多文本文件、多字符串的批
使用 LLM 解释/回答一下
要替换的文件会存放在一个目录里,类型为文本文件,每次替换的内容都相同。
谢谢各位高手!
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!
|

衷心感谢您的帮助,我也会真心帮助大家! |
|
2004-8-16 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
到网上搜索一下吧,这种工具多的是。前面的帖子中好象也曾经讨论过这个问题。
Go search online; there are plenty of such tools. It seems this issue was also discussed in previous posts.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2004-8-16 00:00 |
|
|
power003
初级用户
 
积分 88
发帖 14
注册 2004-8-2
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
又是Climing大侠回答我的问题,很感动!
我是找了很多这方面的工具,但是都不好用,而且我的程序的其他的部分是在DOS下完成的,所以还是想找一下在DOS下解决的方法。
谢谢!
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!
|

衷心感谢您的帮助,我也会真心帮助大家! |
|
2004-8-16 00:00 |
|
|
power003
初级用户
 
积分 88
发帖 14
注册 2004-8-2
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
我看到前面讨论的贴子了,我先研究一下。我要查找替换的内容都每次都是固定的,大侠们如果有更高的招请指教!
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!
|

衷心感谢您的帮助,我也会真心帮助大家! |
|
2004-8-16 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
不用客气,能帮的一定帮。死性不改站友一直使用一个change.exe来做这些文本查找及替换操作,我刚才看了一下这个命令的说明,它本身就直接支持多文件的查找及替换操作(只支持字符串,好象不支持二进制)。另外,可以通过在批处理中for命令和change.exe的配合来实现,好在你替换的内容是固定的,应该比较容易实现。下面我提供这个命令的下载: 点击下载Change.exe(2002.08版,92K)这是该程序的官方主页: http://users.erols.com/waynesof/bruce.htm
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
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2004-8-16 00:00 |
|
|
power003
初级用户
 
积分 88
发帖 14
注册 2004-8-2
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
太感谢,Climing大师了!我的问题已经解决了!有了几行命令可以省去我们很多的人工劳动!因为我要解决的问题很简单,只是每次改相同文件的相同字符,用到的命令如下:change d:\目录\*.txt /from "***" /to "****" 就全部搞定了!再次感谢CLIMING!
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!
|

衷心感谢您的帮助,我也会真心帮助大家! |
|
2004-8-18 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
不用客气,写好帖子(标题清晰,内容完整,没有错字)是对我最大的回报。另外,我查了一下change.exe的文档,它同样支持二进制的查找及替换的。不过它好象不支持正则表达式。
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.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2004-8-18 00:00 |
|
|
power003
初级用户
 
积分 88
发帖 14
注册 2004-8-2
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
我还搞不太懂字符串和二进制的本质区别是什么。我替换的是BIG5的文本文件,也很好用!做批处理的时候是在BIG5的环境里用记事本做的!大家看CLIMING有多可爱,对大家的要求仅仅是“标题清晰,内容完整,没有错字”,我想每一个真正想学东西的人都会做的到!
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!
|

衷心感谢您的帮助,我也会真心帮助大家! |
|
2004-8-18 00:00 |
|