Board logo

标题: 急!!! 誠徵搜尋功能的批處理文件 [打印本页]

作者: chiwing     时间: 2006-8-29 11:25    标题: 急!!! 誠徵搜尋功能的批處理文件

請各位大大 幫我寫一個bat 來作dos 中的搜尋功能, 像windows的搜尋功能一般, 但不是用來search 文字文件中的某字句.
為何我需要這功能? 因為:
http://www.cn-dos.net/forum/view ... id=TFdFoR#pid136587

thx~~


[ Last edited by chiwing on 2006-8-29 at 11:26 ]
作者: chiwing     时间: 2006-8-29 11:29
聽說是用append or path等指令來達成, 不知對不對...
作者: electronixtar     时间: 2006-8-29 16:58
dir /a /b /s *.*
作者: chiwing     时间: 2006-8-31 13:30


  Quote:
Originally posted by electronixtar at 2006-8-29 16:58:
dir /a /b /s *.*

c:\>dir  /a/b/s abc.dll
學習了~~
thx!!!

[ Last edited by chiwing on 2006-8-31 at 14:10 ]
作者: chiwing     时间: 2006-8-31 14:09
如果我想電腦在dos中(無進入windows的情況下),  列出 在drive d 和drive e中所有含有"net"和"transport" 字串的 '目錄 或 檔案' 的路徑, 該打什麼指令?
我的測試過程:
在win xp->开始/运行-> cmd->cd\ -> "Dir D: E: /a/b/s net transport"
可是失敗了!!!


[ Last edited by chiwing on 2006-8-31 at 19:45 ]
作者: vkill     时间: 2006-8-31 15:21
这个能帮你吗?不过要调用find
http://www.cn-dos.net/forum/view ... ge=1&highlight=
作者: chiwing     时间: 2006-8-31 20:23


  Quote:
Originally posted by he200377 at 2006-8-31 15:21:
这个能帮你吗?不过要调用find
http://www.cn-dos.net/forum/view ... ge=1&highlight=

當然能幫得上手...
非常多謝~~
我會send給我的朋友, 相信它們一定會用到的
你的努力, 令萬眾受益
作者: electronixtar     时间: 2006-9-1 17:33
dir /a /b /s D:\*net*;E:\*net*

即:
dir /a /b /s D:\*net*,E:\*net* | find "transport"


简单的事情就8要复杂化

[ Last edited by electronixtar on 2006-9-1 at 17:35 ]