Article ID: 36605 - Last Review: May 12, 2003 - Revision: 2.0 Environment Variable Trailing Spaces Not TruncatedThis article was previously published under Q36605 SUMMARY
When setting environment variables, the following commands produce
different environment variables:
SET FIRST=one SET FIRST =two MORE INFORMATION
The command SET now displays the following (along with all the
other environment variables):
FIRST=one
Trailing spaces are not removed from the environment variable that is
being set. The variables are fully functional and may be addressed in
batch files by using the same syntax when referring to the variable.
For example, the following line
FIRST =two
echo %FIRST %
will print the word "two" on the screen.
APPLIES TO
| Article Translations
|

Back to the top
