title: Batch file with choosing Y/N
body: <p>Please help, I'm a beginner and I need to create batch-file to delete log-files. But before delete I need to ask user to delete the last log-file or all log-files. </p>
  
  <p>I tried to implement it like:</p>
  
  <pre><code>set /P PARAM_VALUE=Remove only the last log file?(Y/N)?  
  
  if /I "%PARAM_VALUE%"=="y" goto DeleteLast
  if /I "%PARAM_VALUE%"=="n" goto DeleteAll
  </code></pre>
  
  <p>But in this case I can enter any values, I need to avoid an others character except <code>Y,y,N,n</code>. <br>
  Thx.</p>