0
The script I am using is
FOR /F "tokens=91 delims=<>" %%v IN ('curl http://ci.onarandombox.com/job/Multiverse-Core/lastStableBuild/api/xml') DO ECHO %%v
What I want it to do is search the output of
curl http://ci.onarandombox.com/job/Multiverse-Core/lastStableBuild/api/xml
(copy and paste the url to see it. in command prompt, the command puts it's all on one line though)
for <artifact><displayPath> **THIS BIT HERE** </displayPath>
and echo the result. When I run it, however, it displays the cURL downloading info, but doesn't echo anything at all. What do I need to change in my script?
Thanks, I was wondering why it didn't work even though the command syntax was correct. I'll try making a script that'll delete the first 90 characters (in steps of 30) and post it here if I manage to get it working. – Craft1n3ss – 2013-04-26T22:45:36.427
After a long walk with my dog I got another idea, please check it out. – Endoro – 2013-04-27T02:00:27.813
1Thanks! I've found another method as well. If you use
curl -g "http://ci.onarandombox.com/job/Multiverse-Core/lastStableBuild/api/xml?tree=artifacts[relativePath]"
, you'll just get the paths. Here's what I eventually got:FOR /F "tokens=14 delims=<>" %%a IN ('curl -g "http://ci.onarandombox.com/job/Multiverse-Core/lastStableBuild/api/xml?tree=artifacts[relativePath]"') DO ECHO url = "http://ci.onarandombox.com/job/Multiverse-Core/lastStableBuild/artifact/%%a" > Cache\Multiverse-Core.txt curl -z plugins\Multiverse-Core.jar -K Cache\Multiverse-Core.txt
– Craft1n3ss – 2013-04-27T06:56:16.707