title: How to identify spacebar in a Batch Script?
body: <p>So, I created a program, which can create and delete folders on the desktop. And I have a problem, when I just write a single space for the name I got the error "Please write a valid folder name!" so it works, but if I'm using more than one spaces, it says "Folder created successfully", and I want to make this program to make an error when I only using spaces in the folder's name. Please help!</p>
  
  <p>Here's a part of my code (the full code is 132 lines long)</p>
  
  <pre><code>set Choice=
  set /p Choice="Choose an option: "
  if '"%Choice%"'=='"1"' goto masodik
  if '"%Choice%"'=='"2"' goto negyedik
  if '"%Choice%"'=='"3"' goto otodik
  if '"%Choice%"'=='"4"' goto harmadik
  if not '"%Choice%"'=='"1"' goto hiba2
  if not '"%Choice%"'=='"2"' goto hiba2
  if not '"%Choice%"'=='"3"' goto hiba2
  if not '"%Choice%"'=='"4"' goto hiba2
  :masodik
  cls
  echo Create a folder
  echo ---------------
  echo.
  cd "%systemdrive%/documents and settings/%username%/desktop"
  echo Enter the folder's name!
  echo.
  set /p mappaneve="The folder's name: "
  if "%mappaneve%" EQU "" goto hiba
  if EXIST "%mappaneve%" goto hiba3
  md "%mappaneve%"
  cls
  echo Create a folder
  echo ---------------
  echo.
  echo Successfully created "%mappaneve%"!
  timeout /t 3 &gt;nul
  cls
  goto elso
  </code></pre>