title: Check if drive letter exists in batch, or else goto another piece of code
body: <p>I'm trying to make a code that detects if a drive letter exists.</p>
  
  <p>For example, to check if C: drive exists my code is:</p>
  
  <pre><code>@echo off
  title If Exist Test
  
  :main
  CLS
  echo.
  echo press any key to see if drive C:\ exists
  echo.
  pause&gt;nul
  IF EXIST C:\ GOTO yes
  ELSE GOTO no
  
  :yes
  cls
  echo yes
  pause&gt;nul
  exit
  
  :no
  cls
  pause&gt;nul
  exit
  </code></pre>
  
  <p>But it doesn't work, it either goes to :yes if C: exists or shoes a blank screen if doesn't. What am I doing wrong, so that it won't go to :no?</p>