Search found 20 matches

by Reino
17 May 2015 11:23
Forum: DOS Batch Forum
Topic: Pipe in for loop breaks double quoted variables
Replies: 11
Views: 5203

Re: Pipe in for loop breaks double quoted variables

I see. Understood. Thanks a lot!
by Reino
17 May 2015 10:09
Forum: DOS Batch Forum
Topic: Pipe in for loop breaks double quoted variables
Replies: 11
Views: 5203

Re: Pipe in for loop breaks double quoted variables

So if I understand correctly, the issue was never about spaces in a directory name, or the presence of a pipe, but rather the presence of parenthesis in the jq-command! But why then isn't it necessary to put the entire command between ' ^" ' when curl.exe and jq.exe are called directly? The par...
by Reino
17 May 2015 05:49
Forum: DOS Batch Forum
Topic: Pipe in for loop breaks double quoted variables
Replies: 11
Views: 5203

Re: Pipe in for loop breaks double quoted variables

Thanks to Dave Benham's answer on a related issue I've found the solution! It appeared to be a specific FOR /F bug in WinXP, and guess what, here I'm still on WinXP. To fix the main offender, the curl-pipe-jq-for-loop, I had to put ' ^" ' in front of and after the entire command, like (' ^"...
by Reino
15 May 2015 15:11
Forum: DOS Batch Forum
Topic: Pipe in for loop breaks double quoted variables
Replies: 11
Views: 5203

Re: Pipe in for loop breaks double quoted variables

I didn't know %%~nxA would also work for urls. Nice! I've further worked out my script: @ECHO off CLS :: NPO JSON-extractor geschreven door Reino Wijnsma, 2015 (reino@degeelebosch.nl) SET batchname=NPO JSON-extractor SET version=1.1 TITLE %batchname% %version% SET curl="C:\map with spaces\curl....
by Reino
14 May 2015 07:13
Forum: DOS Batch Forum
Topic: Pipe in for loop breaks double quoted variables
Replies: 11
Views: 5203

Pipe in for loop breaks double quoted variables

Situation: Using batchscript to retrieve certain values from a JSON. I've got the following batchscript: @ECHO off SET url=http://www.npo.nl/buitenhof/03-05-2015/VPWON_1232766/POMS_VPRO_850040 FOR /F "tokens=6 delims=/" %%A IN ("%url%") DO ( FOR /F "delims=" %%B IN ('cu...