Page 1 of 1

How to pass a url to a batch script

Posted: 26 Mar 2018 03:25
by linuxteche
Hi, I want to pass a url to a batch script for example:

echo TaskID : %TasklId%

If the task id contains a value of 24 I want to pass that task id value to the below url

http://<server>/tasks?action=get&json=false&crit=id=24

Thanks,
Dinesh

Re: How to pass a url to a batch script

Posted: 26 Mar 2018 07:57
by penpen
Your discription of your issue is very short, so i'm unsure what you want to do.
Could it be that you are you looking for something like that:

Code: Select all

@echo off
setlocal enableExtensions enableDelayedExpansion
set "TasklId=24"
echo TaskID : %TasklId%
set "url=http://<server>/tasks?action=get&json=false&crit=id=%TasklId%"
set url
goto :eof
penpen