中国DOS联盟论坛

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-16 01:00
47,813 topics / 349,903 posts / today 1 new / 48,258 members
DOS疑难解答 & 问题讨论 (解答室) » Question!
Printable Version  1,338 / 13
Floor1 李小龙 Posted 2003-07-21 00:00
高级用户 Posts 223 Credits 778
Is there any program that can search for strings.
For example, seach c:\abcd.txt "Matchless Under Heaven"
would display on the screen all lines in c:\abcd.txt that contain "Matchless Under Heaven".
It would be best if it supports wildcards, like seach *.txt "Matchless Under Heaven".
If there really is one, please briefly introduce the syntax.
"CD" can only display the current directory on the screen. Is there any way to write the current directory into SET?
Is there any program that can copy based on a string? For example, copy "Matchless Under Heaven" *.txt c:\windows would copy all text files in the current directory containing "Matchless Under Heaven" to c:\windows.
Many thanks in advance!
Floor2 Wengier Posted 2003-07-21 00:00
系统支持 Posts 10,521 Credits 27,736
A program for finding strings, like the FIND command, will do.

As for “a program that can copy based on a string”, you can use XFIND together with COPY to do it. But since a temporary file is needed in between, you can instead use the XCOPY in DR-DOS, which supports list files, to achieve this effect.
Floor3 李小龙 Posted 2003-07-22 00:00
高级用户 Posts 223 Credits 778
Please explain in detail. How do they work together? Best if you can give a few examples.
Floor4 李小龙 Posted 2003-07-22 00:00
高级用户 Posts 223 Credits 778
I beg you on my knees.
Floor5 Wengier Posted 2003-07-22 00:00
系统支持 Posts 10,521 Credits 27,736
For example, try this:

for %f in (*.txt) do find %f "Matchless Under Heaven"
Floor6 李小龙 Posted 2003-07-22 00:00
高级用户 Posts 223 Credits 778
For example, seach c:\abcd.txt "Matchless Under Heaven"
would display on the screen all lines in c:\abcd.txt that contain "Matchless Under Heaven".
How do you do that?
Floor7 Wengier Posted 2003-07-22 00:00
系统支持 Posts 10,521 Credits 27,736
Use this:
find c:\abcd.txt "Matchless Under Heaven"
Floor8 李小龙 Posted 2003-07-23 00:00
高级用户 Posts 223 Credits 778
Last question:
"CD" can only display the current directory on the screen. Is there any way to write the current directory into SET?
Floor9 Wengier Posted 2003-07-23 00:00
系统支持 Posts 10,521 Credits 27,736
If you want to write it into SET, try this:

CD|NSET CD=$1
Floor10 如是大师 Posted 2003-07-24 00:00
元老会员 Posts 3,351 Credits 9,654 From 湖北
Xiaolong is back... welcome
Floor11 李小龙 Posted 2003-07-25 00:00
高级用户 Posts 223 Credits 778
What is CD|NSET CD=$1?
What is NSET?
Floor12 Wengier Posted 2003-07-25 00:00
系统支持 Posts 10,521 Credits 27,736
NSET sends the screen output into the specified variable...
Floor13 李小龙 Posted 2003-07-26 00:00
高级用户 Posts 223 Credits 778
Doesn't work.
Floor14 Wengier Posted 2003-07-26 00:00
系统支持 Posts 10,521 Credits 27,736
The following is quoted from 李小龙 on 2003-7-26 10:14:37:
Doesn't work.


Did you download the NSET.COM file?
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023