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 23:13
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Find the specified file (batch processing) View 3,201 Replies 22
Original Poster Posted 2005-11-15 02:40 ·  中国 北京 朝阳区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
@echo off
echo USAGE: "BAG 查找的目录 完整文件名"
echo Example: bag.bat c:\ bagpipe.txt 注意:空格的位置
echo This batch script is only applicable to FAT32 partitions and uses the system WIN 2000/XP
chkdsk %1 /v|find "%2" >1.txt
notepad 1.txt
del 1.txt
Attachments
BAG.rar (243 bytes, Credits to download 1 pts, Downloads: 103)
Floor 2 Posted 2005-11-15 18:23 ·  中国 辽宁 锦州 中移铁通
荣誉版主
★★★
Credits 1,338
Posts 356
Joined 2005-07-15 12:09
21-year member
UID 40733
Gender Male
Status Offline
Is it necessary to be so troublesome!
Try:
dir /s /b bagpipe.txt
Floor 3 Posted 2005-11-15 19:40 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
Re bagpipe:
Hehe, this batch processing goes around in a big circle, and it also has to use the external command CHKDSK.

Re 无奈何:
It's best to add an additional /a parameter, like: dir /s /a /b bagpipe.txt
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 4 Posted 2005-11-16 00:12 ·  中国 湖北 武汉 电信
初级用户
★★
Credits 168
Posts 85
Joined 2005-08-26 00:19
20-year member
UID 41941
Gender Male
Status Offline
Learning
Floor 5 Posted 2005-11-16 06:12 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
Alas, I just want to post some threads. Do others' thread qualities have to be judged by you? This is just a method, no need to be so serious, right?
Floor 6 Posted 2005-11-16 08:59 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
You all are experts, I'm just a fool. I'll do as you say, OK? I won't post such threads again in the future. It's too embarrassing. Really embarrassing. I'm too ashamed to come here anymore!
Floor 7 Posted 2005-11-16 18:08 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Oh, so chkdsk has such a function? Study hard and develop it.
Floor 8 Posted 2005-11-16 23:21 ·  中国 江西 萍乡 电信
新手上路
Credits 10
Posts 5
Joined 2005-11-12 18:26
20-year member
UID 45129
Status Offline
Originally posted by bagpipe at 2005-11-16 08:59:
You guys are all experts, I'm just a fool. I'll do as you say, OK? I won't post such threads in the future. It's too embarrassing. Really too embarrassing. I'm too ashamed to come here anymore!

What's wrong with you? Others didn't say anything. People share good methods to let everyone learn from each other! I've benefited from the methods you guys shared! You can all be my teachers!
Floor 9 Posted 2005-11-17 11:19 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
What's wrong with you? Can't you allow others to have a little opinion? You feel ashamed just because others have a little opinion! There's no need for that!
Floor 10 Posted 2005-12-09 15:46 ·  中国 湖南 长沙 电信
新手上路
Credits 8
Posts 4
Joined 2005-12-08 10:33
20-year member
UID 46710
Gender Male
Status Offline
Our progress is always gained through continuous improvement. There's no need to feel ashamed because your method is not good. In fact, what you gain is far more than what you lose. Also, learn to be grateful instead of complaining.
Floor 11 Posted 2005-12-11 09:39 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
Guys, I want to apologize to you here. I wasn't in a good mood back then. I hope the friends on the upper floors can forgive me. What the 10th floor said is right, we all progress through failures. Let's work hard together from now on. Please forgive me this time. Actually, I'm not the kind of person who haggles over every detail in real life! I hope we can all become friends!!!!!!!!!!!!!!!!!!!!
Floor 12 Posted 2005-12-17 15:21 ·  中国 广东 广州 白云区 电信
初级用户
★★
Credits 152
Posts 74
Joined 2005-12-01 23:06
20-year member
UID 46314
Status Offline
Hehe~~~he~~~Passing by, I won't interfere with your quarrel!
Floor 13 Posted 2005-12-19 09:50 ·  中国 广东 东莞 电信
初级用户
Credits 51
Posts 17
Joined 2005-09-19 14:53
20-year member
UID 42632
Gender Male
Status Offline
Is failure the mother of success?
Floor 14 Posted 2005-12-19 23:44 ·  中国 辽宁 锦州 中移铁通
荣誉版主
★★★
Credits 1,338
Posts 356
Joined 2005-07-15 12:09
21-year member
UID 40733
Gender Male
Status Offline
to bagpipe

I rarely come to this section, and this is one of the few posts I've made in this section. I didn't expect such an episode. I didn't mean to look down on or disrespect you. Using as few commands as possible to complete a task is a skill, and combining multiple commands is also a skill. I will try to be more careful with my words in the future.
  ☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul

Floor 15 Posted 2006-01-02 15:22 ·  中国 江苏 苏州 吴江区 电信
初级用户
★★
Credits 125
Posts 72
Joined 2005-09-13 06:10
20-year member
UID 42467
Status Offline
Learning
Forum Jump: