@echo off
lh tw.exe
rem 启动天汇汉字系统
echo
echo
echo正在搜索磁盘上的*.txt文件,请稍候…
echo
echo
c:
dir *.txt /s >c:\1.txt
d:
dir *.txt /s >>c:\1.txt
e:
dir *.txt /s >>c:\1.txt
f:
dir *.txt /s >>c:\1.txt
g:
dir *.txt /s >>c:\1.txt
h:
dir *.txt /s >>c:\1.txt
i:
dir *.txt /s >>c:\1.txt
type c:\1.txt
pause
goto aaa
:aaa
我的问题是:各台机子磁盘的分区数量可能不同,如何让我的批处理与之相适应呢?
请各位高手指教,谢谢
[ Last edited by lks205 on 2006-2-3 at 21:29 ]作者: JonePeng 时间: 2006-1-30 11:13 汗-_-||
这个批处理使我想起最近流行的“移动杀手”病毒(专门删除所有硬盘的Word文档的病毒)。作者: jzhupo 时间: 2006-1-31 19:52 ......
if not exist d:\nul goto end
d:
dir *.txt /s >>c:\1.txt
if not exist e:\nul goto end
......
:end
rem exit作者: lks205 时间: 2006-1-31 20:26 谢谢楼上的两位老大作者: willsort 时间: 2006-2-3 18:46
Originally posted by jzhupo at 2006-1-31 19:52:
......
if not exist d:\nul goto end
d:
dir *.txt /s >>c:\1.txt
if not exist e:\nul goto end
......
:end
rem exit
我试了一下,发现在磁盘搜索完毕时没有自然终止,当遇到光驱的盘符时就出问题了作者: willsort 时间: 2006-2-4 08:29 Re lks205: