中国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-02 00:11
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS批处理 & 脚本技术(批处理室) » Find the specified file (batch processing)
Printable Version  3,204 / 22
Floor1 bagpipe Posted 2005-11-15 02:40
银牌会员 Posts 425 Credits 1,144 From 北京
@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)
Floor2 无奈何 Posted 2005-11-15 18:23
荣誉版主 Posts 356 Credits 1,338
Is it necessary to be so troublesome!
Try:
dir /s /b bagpipe.txt
Floor3 JonePeng Posted 2005-11-15 19:40
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
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
Floor4 lpclimber Posted 2005-11-16 00:12
初级用户 Posts 85 Credits 168
Learning
Floor5 bagpipe Posted 2005-11-16 06:12
银牌会员 Posts 425 Credits 1,144 From 北京
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?
Floor6 bagpipe Posted 2005-11-16 08:59
银牌会员 Posts 425 Credits 1,144 From 北京
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!
Floor7 electronixtar Posted 2005-11-16 18:08
铂金会员 Posts 2,672 Credits 7,493
Oh, so chkdsk has such a function? Study hard and develop it.
Floor8 PGNGJ3499 Posted 2005-11-16 23:21
新手上路 Posts 5 Credits 10
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!
Floor9 不得不爱 Posted 2005-11-17 11:19
超级版主 Posts 2,044 Credits 5,310 From 四川南充
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!
Floor10 andydufresne Posted 2005-12-09 15:46
新手上路 Posts 4 Credits 8
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.
Floor11 bagpipe Posted 2005-12-11 09:39
银牌会员 Posts 425 Credits 1,144 From 北京
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!!!!!!!!!!!!!!!!!!!!
Floor12 flamey Posted 2005-12-17 15:21
初级用户 Posts 74 Credits 152
Hehe~~~he~~~Passing by, I won't interfere with your quarrel!
Floor13 lrb Posted 2005-12-19 09:50
初级用户 Posts 17 Credits 51
Is failure the mother of success?
Floor14 无奈何 Posted 2005-12-19 23:44
荣誉版主 Posts 356 Credits 1,338
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.
Floor15 lfdjssz Posted 2006-01-02 15:22
初级用户 Posts 72 Credits 125
Learning
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023