This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 请教: 在DOS下, 怎么检查一个文件是不是空文件(0 Byte). 多谢.
-1patrick(潜水中断);
2004-11-29
(#2004650@0)
-
C:\ DIR /O:S
-scottee(笑熬浆糊);
2004-11-29
(#2004705@0)
-
是想写个batch file, 如果是 0 Byte, 就直接delete了.
-1patrick(潜水中断);
2004-11-29
(#2005525@0)
-
forfiles
-redspider(红蜘蛛);
2004-11-29
{1308}
(#2005918@0)
-
正解.
-scottee(笑熬浆糊);
2004-11-30
(#2006068@0)
-
谢谢了, 长见识了... 俺再琢磨琢磨.
-1patrick(潜水中断);
2004-11-30
(#2006097@0)
-
楼主可能不是这个意思。
-aka(棒棒);
2004-11-29
(#2005530@0)
-
用VB Script最简单了。进来看。
-johnnyhatesjazz(Rock and Roll);
2004-11-30
{705}
(#2006207@0)
-
贴子把 "\" 给略掉了。在Dosearch参数里面,最后一个引号里面是一个back slash
-johnnyhatesjazz(Rock and Roll);
2004-11-30
(#2006209@0)
-
I am using this scriptfc /b yourfile null | find "FC: no differences encountered" >null
if errorlevel==2 goto _failed
if errorlevel==1 if not errorlevel==2 goto _successed
if errorlevel==0 if not errorlevel==1 goto _zerobyte
-handd(大熊猫®);
2004-11-30
{208}
(#2006364@0)
-
powerful perl$dir = "yourdir";
opendir(DIR, $dir);
while($file = readdir(DIR)) { if(-s $file) unlink($file); }
closedir(DIR);
NOT TESTED, but 差不多这个意思。
-xanada(㊣流水);
2004-11-30
{157}
(#2006413@0)
-
perl is always my favorite scripting language, forfiles is a quick solution, for some sophisticated problem perl is my first choice.
-redspider(红蜘蛛);
2004-11-30
(#2006518@0)
-
yeah i'm a perl fan alough I'm not using it now. it's always succinct, powerful and elegant.
-xanada(㊣流水);
2004-11-30
(#2006522@0)
-
都是能人啊! :-) 一直是用Perl的, 只是想看看有没有更简单的DOS command. 看来是没有比Perl更简单的, 又得劝劝super, 还是装Perl 吧. 谢谢大伙!
-1patrick(潜水中断);
2004-11-30
(#2006615@0)