title: how to capture standard erros like "The system cannot find the drive specified." or "The system cannot find the path specified." in a batch script
body: <p>I am trying to develop a windows batch program where if error like <code>The system cannot find the drive specified.</code> or <code>The system cannot find the path specified.</code> comes, then "fld_chk.out" file can be checked and looping can happen.</p>
  
  <p>But cd A:\rr\Br>fld_chk.out is not capturing these errors. </p>
  
  <p>how to do capture there standard errors?</p>
  
  <p>My code is like this:-</p>
  
  <pre><code>cd A:\rr\Br&gt;fld_chk.out
  cd B:\yy\dd&gt;&gt;fld_chk.out
  find /c "The system cannot find" *.out&gt;fld_count_check_1.out
  find /c "0" fld_count_check_1.out&gt;fld_count_check_2.out
  FOR /F "TOKENS=1* DELIMS=:" %%B IN (fld_count_check_2.out) DO SET b=%%C
  set _count=%b%
  IF %_count% EQU 2 goto Success
  IF not %_count% EQU 2 goto notSuccess
  :Success
  echo folder found
  :notSuccess
  echo folder not found
  </code></pre>
  
  <p>Thanks in advance
  Sree</p>