Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 713 Posts 348 Joined 2007-02-10 13:59 19-year member UID 79169 Gender Male
Status Offline
RE wandyac
for %a in (c: d: e: f do @dir %a\ | find "bytes free"
This line?
for %%a in (c: d: e: f) do (
@dir %%a\ | find "bytes free"
)
Like this?
It still doesn't execute successfully this way either
[ Last edited by haiou327 on 2008-1-4 at 10:17 PM ]
Credits 40 Posts 23 Joined 2009-10-15 21:49 16-year member UID 153140 Gender Male
Status Offline
Originally posted by rechard at 2007-5-25 10:44:
I just tried:
for %a in (*.txt) do type %a
But if the filename contains spaces, for example:
001.txt
复件 001.txt
it can only display 001.txt, but can't display the contents of the file "复件 001.txt". How should it be modified?
for %a in (*.txt) do type "%a"
Just add double quotes around the %a at the end...
Otherwise the type command thinks they're multiple files separated by spaces...
Credits 40 Posts 23 Joined 2009-10-15 21:49 16-year member UID 153140 Gender Male
Status Offline
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"
This line?
for %%a in (c: d: e: f) do (
@dir %%a\ | fin ...
Only in a batch file do you use %%a; for ordinary commands use %a
for %a in (c: d: e: f:) do @dir %a\ | find "bytes free"
or inside a batch file
for %%a in (c: d: e: f:) do @dir %%a\ | find "bytes free"