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-08-01 08:48
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » {Closed}How to define content output View 2,651 Replies 7
Original Poster Posted 2007-01-04 07:42 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
mode con lines=15 cols=40
set /p str=Please enter the QQ number for which you want to extract the password:
for /f "delims=- tokens=1*" %%i in (Z:\QQ\9QQ.txt) do if %%i==%str% echo The password you want to extract is: %%j
echo ========Marked as sold
@ECHO %dbg% OFF
setlocal ENABLEDELAYEDEXPANSION

FOR /F %%i in (Z:\QQ\9QQ.txt) do (

SET STR=%%i
SET STR=!STR:%str%=%str%已卖出!
ECHO !STR!>>Z:\QQ\已卖9QQ.txt
)
Why does this generate all the contents of 9QQ.txt in "已卖9QQ.txt" after entering?
How to modify it so that only the line where %str% is entered is output in "已卖9QQ.txt"!
Please help, brothers ~~~

[ Last edited by chainliq on 2007-1-11 at 05:55 AM ]
Floor 2 Posted 2007-01-04 09:25 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
Hey, urgent need, which brother can give a hint~
Floor 3 Posted 2007-01-05 02:21 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
Everyone, give me a hint ah``````````I I I`````````
Floor 4 Posted 2007-01-05 04:08 ·  中国 上海 浦东新区 电信
初级用户
★★
Credits 148
Posts 69
Joined 2006-11-23 23:04
19-year member
UID 71504
Gender Male
Status Offline
Floor 5 Posted 2007-01-08 05:12 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
学无尽止
Floor 6 Posted 2007-01-21 00:45 ·  中国 天津 电信
初级用户
Credits 97
Posts 43
Joined 2005-07-25 22:07
21-year member
UID 41055
Status Offline
Why has it been closed without stating the solution to let everyone learn?
Floor 7 Posted 2008-04-07 10:13 ·  中国 广东 深圳 电信
新手上路
Credits 14
Posts 7
Joined 2008-04-02 20:44
18-year member
UID 114786
Gender Male
Status Offline
Floor 8 Posted 2008-05-15 18:31 ·  中国 陕西 西安 电信
新手上路
Credits 4
Posts 2
Joined 2006-12-22 23:35
19-year member
UID 74303
Gender Male
Status Offline
echo [on | off]
echo [message]
echo.
echo message > [driver:] [path] filename
@
//////////////////////////////////////////
Description
on | off
If set to ON, the command being executed will be displayed on the screen when the batch file is executed. If set to OFF, the command being executed will not be displayed on the screen when executed. If neither ON nor OFF is omitted, the current status of the ECHO command will be displayed

MESSAGE
is the information that will be displayed on the screen. Using the ECHO. command will leave a blank line on the screen.
>[drive:] [path] filename
Performs output redirection, and >[drive:] [path] filename specifies the location and filename of the storage file
@ In the batch file, the command after @ will not be displayed on the screen
Forum Jump: