954,260 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem with equal mark in input variable

Hi Guys,

Sorry but i have posted this script in a wrong section previously.

I've got a small issue passing the string from command line parameter into the variable within the script.
An issue is when the parameter contains an equal mark in the string that brakes the line and the everything after an equal mark is missing. See an example:

script.bat

username=%1
password=%2

echo %username%
echo %password%

::END_SCRIPT


When I run the script as follow:

c:\script.bat John mypass&*(+=word&*
John
mypass&*(+


As you can observe everything after "=" mark has been skipped and variable %password% returns only part of the stringmypass&*(+ and word&* is missing.

My question is whether can it be fixed some how and pass the string containing "=" mark from parameter into variable within the script?

Any help, feedback would be appreciated.
Cheers!!
emarcel.

emarcel
Newbie Poster
3 posts since Jul 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You