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-15 12:51
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » How to block messy information? View 1,798 Replies 7
Original Poster Posted 2008-07-16 05:00 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 248
Posts 126
Joined 2008-05-30 17:18
18-year member
UID 120118
Gender Male
Status Offline
set drv=C D E F G H I J K L M N O P Q R S T U V W X Y Z
for %%i in (%drv%) do dir %%i:\*.gho /b /s /a >>temp.txt
find /i ".gho" temp.txt >nul
type temp.txt | lmod set lastdrv=[] > temp.bat
call temp.bat >nul
if not exist %lastdrv% goto hfqt_2
Ghost -clone,mode=pload,src=%lastdrv%:1,dst=1:1 -sure -fx

This P is what I use to find backup files on the entire disk for automatic recovery. When finding the last hard drive in the machine during the search, a lot of messy information appears. How to block these messages??
I have searched the forum for a long time and tried many methods, but it hasn't been solved. Please help me, dear experts, thank you!
Floor 2 Posted 2008-07-16 09:14 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
What messy information is that?
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 3 Posted 2008-07-16 17:04 ·  中国 上海 静安区 电信
中级用户
★★
Credits 248
Posts 126
Joined 2008-05-30 17:18
18-year member
UID 120118
Gender Male
Status Offline
Can't find the file, the information fed back.
My machine has two hard drives and two optical drives. The last hard drive letter is K. In pure DOS, the virtual disk is L. The two optical drives are drives M and N respectively. When the file is not found during the search, the returned information is a long section. Although it only flashes by, I think it's not good. The screen is not clean. I want to ask the experts for help. See if these messages can be shielded...
Floor 4 Posted 2008-07-16 18:03 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
dir /a-d/b/s %%i:\*.gho 2>nul
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 5 Posted 2008-07-16 22:10 ·  中国 上海 静安区 电信
中级用户
★★
Credits 248
Posts 126
Joined 2008-05-30 17:18
18-year member
UID 120118
Gender Male
Status Offline
First, thank you!!!!!!!!!!!!!!!!!!!!!!

After trying, I found that the information like "file not found" is gone, but the information like "drive not found or drive path is incorrect" (this is the Chinese meaning, my English is too bad, just guessing) still appears. How can these information be blocked???

[ Last edited by jh1688 on 2008-7-18 at 01:42 AM ]
Floor 6 Posted 2008-07-21 00:19 ·  中国 山东 聊城 电信
系统支持
★★★
Credits 1,023
Posts 438
Joined 2007-02-08 00:00
19-year member
UID 78999
Gender Male
Status Offline
You try grep to find the information you want
Floor 7 Posted 2009-12-24 23:40 ·  中国 广东 深圳 联通
初级用户
少帅
Credits 42
Posts 24
Joined 2009-12-17 20:53
16-year member
UID 156814
Gender Male
From 深圳
Status Offline
When encountering similar problems, come and learn
Floor 8 Posted 2009-12-30 20:15 ·  中国 江苏 南京 电信
初级用户
★★
Credits 138
Posts 50
Joined 2007-01-23 10:59
19-year member
UID 77428
Gender Male
Status Offline
DOS command codes can have outputs, which include normal outputs and error codes.
For example:
pause >nul
The default is to block output channel 1, that is, "Press any key to continue..."
That is, it can be written as pause 1>nul
Take dir as an example. It has two outputs, one is the normal list 1, and one is the error code 2. So you can use the following code to obtain both.
dir *.jpg 1>list.txt 2>err.txt
When there are no JPG format files, it is output from channel 2 to the err.txt file
Forum Jump: