Batch file help, output results of a for / do string
I have a batch statement here, although for some reason it does not output the output to a file.
for /f %%a in (items.lst) do shop -r items.text %%a > result.lst
It works with normal statements, although开发者_如何学C with the FOR and DO statements its not working, could anyone shed any light on this please?
This loop deletes the results on every iteration. Did you mean to use >>
?
You could put it in parenthesis.
( for /f %%a in (items.lst) do shop -r items.text %%a) > result.lst
Then you redirect the complete output to result.lst
, else you redirect for each iteration to result.lst
with new creation of the file
精彩评论