i need to extract only URL and app id in the given string and saved in variables
url:{ \"url\":\"ad.ifwcash.com/www/delivery/afr.php?zoneid=127&cb=201
this works if there's an url.txt
file in same directory with content:
{"url":{ "url":"ad.ifwcash.com/www/delivery/afr.php?zoneid=127&cb=2015738640", "app":61}}
Eventually you'll need to change name/location of the file on the third line (save the file bellow with .bat
extension):
@echo off
setlocal enableDelayedExpansion
set "jsonFile=.\url.txt"
set counter=1
for /f %%# in ('echo %jsonFile%^|mshta.exe "%~f0"') do (
set "variable_!counter!=%%#"
set /a counter=counter+1
)
set variable_
echo #############################
echo ### more batch code here ###
echo #############################
exit /b