For /f batch file loop not working?
Hi,
Recently, I decided to replace most of the PowerShell code with batch file code in my appveyor.yml
file. I had to put a for /f
loop to parse the output of two commands and some more to parse textfiles. But this doesn't work. I have tried it both locally and in RDP and woking fine!
Some examples:
1. https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/build/job...
2. https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/21...
and some more similar examples. Why this happens only in the console and not locally or remotely?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Owen McDonnell on 18 Dec, 2018 07:02 PM
Please demonstrate where you think AppVeyor is not working via a minimal repro of the error.
In this case, you can simply start a project with one single text file and run those commands in init stage.
2 Posted by doublebeep7 on 19 Dec, 2018 11:55 AM
Hi, I have made several tests:
https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/21...
https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/21...
https://ci.appveyor.com/project/double-beep/asmfish-i5x4k/builds/21...
Support Staff 3 Posted by Owen McDonnell on 19 Dec, 2018 05:24 PM
Just add another
to%
to the loop parameter.change
Owen McDonnell closed this discussion on 19 Dec, 2018 05:24 PM.
doublebeep7 re-opened this discussion on 20 Dec, 2018 03:16 PM
4 Posted by doublebeep7 on 20 Dec, 2018 03:16 PM
Thanks for replying; it works fine. Why should I double percent-signs? My code isn't running from cmd?
5 Posted by doublebeep7 on 04 Jan, 2019 03:19 PM
This has not attracted so much attention. Closing so...
doublebeep7 closed this discussion on 04 Jan, 2019 03:19 PM.