标题: if exist只能判断文件不能判断目录吗?
[打印本页]
作者: yysn
时间: 2010-12-30 02:56
标题: if exist只能判断文件不能判断目录吗?
有个目录test
我使用
if exist c:\test echo 111
发现打不出来111
用if exist c:\test\*.* echo 111
也打不出来111
然后我往c:\test里放入一个文件,
然后再if exist c:\test\*.* echo 111
发现111打出来了
是不是if exist无法判断目录?
作者: yysn
时间: 2010-12-30 03:48
我发现了一件事,为什么大家都能用的命令到了我的系统上就不能用了 - -
我在windows上开了cmd运行,确实是可以的,但是.......
莫非大家都在玩windows下的cmd?
我的是pc-dos 7,就是纯dos系统,因为本人目前还工作在dos下。
[
Last edited by yysn on 2010-12-30 at 03:49 ]
作者: Hanyeguxing
时间: 2010-12-30 07:36
if exist c:\test\ echo 目录