Message3682
To illustrate the problem:
C:\stuff\temp>set TEST=my test
C:\stuff\temp>echo %TEST%
my test
C:\stuff\temp>if not [%TEST%]==[] echo [%TEST%] is set
"test]==[]" is syntactically not valid here
C:\stuff\temp>if not "%TEST%"=="" echo [%TEST%] is set
[my test] is set
C:\stuff\temp>if not '%TEST%'=='' echo [%TEST%] is set
"test'==''" is syntactically not valid here
C:\stuff\temp>set TEST="my test"
C:\stuff\temp>echo %TEST%
"my test"
C:\stuff\temp>if not [%TEST%]==[] echo [%TEST%] is set
["my test"] is set
C:\stuff\temp>if not "%TEST%"=="" echo [%TEST%] is set
"test""==""" is syntactically not valid here
C:\stuff\temp>if not '%TEST%'=='' echo [%TEST%] is set
["my test"] is set
The error message is my translation from the German:
kann syntaktisch an dieser Stelle nicht verarbeitet werden
Summary:
There is no common syntax for testing the emptiness of a string
(containing spaces, quoted or unquoted). |
|
Date |
User |
Action |
Args |
2008-10-14 12:31:05 | otmarhumbel | set | messageid: <1223987465.98.0.954016507497.issue1125@psf.upfronthosting.co.za> |
2008-10-14 12:31:05 | otmarhumbel | set | recipients:
+ otmarhumbel, fwierzbicki, mr_tines, foripperz |
2008-10-14 12:31:05 | otmarhumbel | link | issue1125 messages |
2008-10-14 12:31:05 | otmarhumbel | create | |
|