RudePuppyDog
asked on
Passing input parameter to batch file that contains equal sign
I have the following command from a UNIX system that will launch a batch file on a Windows system.
The batch file simply calls up an IE session with the URL that is the input parameter to the batch file.
rsh hostname -l username c:\\temp\\test.bat "http://xxx.xxxl.com/Add.asp?ABC=xx&DEF=yy"
The problem is that the batch file does not recognize the "=" sign
It also gives me this
'DEF'' is not recognized as an internal or external command
so it may be having trouble with the "&" sign.
How can i pass a URL to a batch file where the URL contains "=" and "&" signs?
The batch file simply calls up an IE session with the URL that is the input parameter to the batch file.
rsh hostname -l username c:\\temp\\test.bat "http://xxx.xxxl.com/Add.asp?ABC=xx&DEF=yy"
The problem is that the batch file does not recognize the "=" sign
It also gives me this
'DEF'' is not recognized as an internal or external command
so it may be having trouble with the "&" sign.
How can i pass a URL to a batch file where the URL contains "=" and "&" signs?
ASKER
When it opens the IE window, the URL is
http://xxx.xxxl.com/Add.asp?ABC
so I think its getting confused with the "=" in the URL
set URL=http://xxx.xxxl.com/Add.asp?ABC=xx&DEF=yy would have multiple "=" signs.
http://xxx.xxxl.com/Add.asp?ABC
so I think its getting confused with the "=" in the URL
set URL=http://xxx.xxxl.com/Add.asp?ABC=xx&DEF=yy would have multiple "=" signs.
Even
set URL=%1
echo %URL%
"%ProgramFiles%\Internet Explorer\iexplore.exe" %URL%
as the batch file works fine.
set URL=%1
echo %URL%
"%ProgramFiles%\Internet Explorer\iexplore.exe" %URL%
as the batch file works fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Closer, but when I escape the quotes on the UNIX side, the browsers opens up with the following URL:
http://xxx.xxxl.com/Add.asp?ABC=xx
Its dropping the "&" and everything after that.
http://xxx.xxxl.com/Add.asp?ABC=xx
Its dropping the "&" and everything after that.
set URL=%1
echo %URL%
and call that like
test "http://xxx.xxxl.com/Add.asp?ABC=xx&DEF=yy"
that works fine.