title: Batch check for empty user input
body: <p>I am struggling with a simple check if the user input was just empty (Enter) and in case set the variable to a new value... spend an hour but it does not work.
  Goal is to have the entered Value beginning with a backslash OR just an empty string if nothing was entered.</p>
  
  <p>Code:</p>
  
  <pre><code>SET myTargetServerInstanceName=anyNOPEdummyValue
  SET /P myTargetServerInstanceName=Enter Target Server INSTANCE Name:    
  IF %myTargetServerInstanceName%==anyNOPEdummyValue SET myTargetServerInstanceName=
  IF NOT %myTargetServerInstanceName% == [] SET myTargetServerInstanceName=\%myTargetServerInstanceName%
  </code></pre>
  
  <p>this results in error:</p>
  
  <blockquote>
    <p>SET was unexpected at this time.</p>
  </blockquote>