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-26 11:23
Original Poster Posted 2003-07-21 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
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!
Floor 2 Posted 2003-07-21 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
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.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2003-07-22 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
Please explain in detail. How do they work together? Best if you can give a few examples.
Floor 4 Posted 2003-07-22 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
I beg you on my knees.
Floor 5 Posted 2003-07-22 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
For example, try this:

for %f in (*.txt) do find %f "Matchless Under Heaven"
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 6 Posted 2003-07-22 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
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?
Floor 7 Posted 2003-07-22 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Use this:
find c:\abcd.txt "Matchless Under Heaven"
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 8 Posted 2003-07-23 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
Last question:
"CD" can only display the current directory on the screen. Is there any way to write the current directory into SET?
Floor 9 Posted 2003-07-23 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
If you want to write it into SET, try this:

CD|NSET CD=$1
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 10 Posted 2003-07-24 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Xiaolong is back... welcome
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 11 Posted 2003-07-25 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
What is CD|NSET CD=$1?
What is NSET?
Floor 12 Posted 2003-07-25 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
NSET sends the screen output into the specified variable...
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 13 Posted 2003-07-26 00:00 ·  中国 浙江 宁波 电信
高级用户
★★
S
Credits 778
Posts 223
Joined 2003-05-10 00:00
23-year member
UID 1974
Gender Male
Status Offline
Doesn't work.
Floor 14 Posted 2003-07-26 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is quoted from 李小龙 on 2003-7-26 10:14:37:
Doesn't work.


Did you download the NSET.COM file?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Forum Jump: