开发者

Batch file help, output results of a for / do string

开发者 https://www.devze.com 2023-03-07 07:03 出处:网络
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

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

精彩评论

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