开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜