![]() |
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-09-23 15:27 |
47,812 topics / 349,917 posts / today 0 new / 48,273 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] Two more difficult batch file problems (Solved) |
| Printable Version 1,590 / 6 |
| Floor1 jojo2008 | Posted 2005-11-21 20:37 |
| 初级用户 Posts 11 Credits 38 | |
|
1. Modify the string content in a specified column of a text file
Example: in the text file a.ini, the content in column 9 is: aaa bbb 123456 It needs to be changed to: aaa bbb 88888 What program should be used to do this? 2. Use the content of an existing text file to replace the string content in a specified column of another text file. Example: contents of a.ini: aaa bbb ccc aaa bbb ccc =123456789 Need to use the contents inside another b.ini to replace the 123456789 content in a.ini. How should this be done? Please help solve this! [ Last edited by jojo2008 on 2005-11-27 at 16:36 ] |
|
| Floor2 jojo2008 | Posted 2005-11-21 21:42 |
| 初级用户 Posts 11 Credits 38 | |
|
Also, can the tool INIFile 1.0 be used in the above batch file processing?
|
|
| Floor3 jojo2008 | Posted 2005-11-21 21:49 |
| 初级用户 Posts 11 Credits 38 | |
|
Looking for a change file tool!
[ Last edited by jojo2008 on 2005-11-21 at 21:53 ] |
|
| Floor4 无奈何 | Posted 2005-11-21 23:51 |
| 荣誉版主 Posts 356 Credits 1,338 | |
|
The OP should explain the required working environment, and the examples you gave are not clear enough. It would be best to post the complete ones.
Under NT, using for to parse text can achieve the replacement, but it's very cumbersome. Try sed. There are versions for various systems, and it's very convenient for handling text. |
|
| Floor5 jojo2008 | Posted 2005-11-22 17:01 |
| 初级用户 Posts 11 Credits 38 | |
|
WINDOWS real mode
|
|
| Floor6 JonePeng | Posted 2005-11-22 19:20 |
| 金牌会员 Posts 1,883 Credits 4,562 From 广东广州 | |
Originally posted by jojo2008 at 2005-11-21 21:49: For the CHANGE download and usage instructions, please see this thread: http://www.cn-dos.net/forum/viewthread.php?tid=17669 |
|
| Floor7 jojo2008 | Posted 2005-11-27 16:35 |
| 初级用户 Posts 11 Credits 38 | |
|
I've already written a piece of software myself to do it! Many thanks! This thread is locked!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |