楼主发的内容详尽,小二给您顶了!!作者: 17500 时间: 2007-12-4 20:29 领教啦for,太厉害啦作者: popoweb 时间: 2007-12-5 20:37 好帖子,这样复制的命令应当用专题来讲比较好。作者: fydncom 时间: 2007-12-6 14:43 FOR 学习下 功能真强大啊作者: hulongzhuo 时间: 2007-12-28 11:28 很强大,终于学懂了FOR,好高兴!!作者: haiou327 时间: 2008-1-4 22:13 RE wandyac
for %a in (c: d: e: f do @dir %a\ | find "bytes free"
这句?
for %%a in (c: d: e: f) do (
@dir %%a\ | find "bytes free"
)
是这样的吗
这样也执行不成功
[ Last edited by haiou327 on 2008-1-4 at 10:17 PM ]作者: riversail 时间: 2008-1-9 23:16 我的好好看看...
谢谢了啊...作者: aeihua 时间: 2008-9-28 15:36 贴子重复啊?不是吧?作者: mwm5 时间: 2009-10-18 04:55
Quote:
Originally posted by rechard at 2007-5-25 10:44:
刚试了:
for %a in (*.txt) do type %a
但如果文件名中有空格,如:
001.txt
复件 001.txt
只能显示001.txt,但不能显示"复件 001.txt"文件的内容,应该如何修改?
for %a in (*.txt) do type "%a"
后头的%a加上双引号就好了。。
否则type命令以为是空格分隔的多个文件了。。作者: mwm5 时间: 2009-10-18 04:59
Quote:
Originally posted by haiou327 at 2008-1-4 22:13:
RE wandyac
for %a in (c: d: e: f do @dir %a\ | find "bytes free"
这句?
for %%a in (c: d: e: f) do (
@dir %%a\ | fin ...
批处理里头才用%%a,普通的命令用%a
for %a in (c: d: e: f:) do @dir %a\ | find "bytes free"
或者批处理里头