title: Batch : error during move
body: <p>I try to move file from folder1 to folder2 into loop.
  But sometimes, files do not move and Error level tests equals 0 into loop.</p>
  
  <pre><code>FOR %%f IN (%folder%\*.txt) DO (
          call :loop %%~nxf
  )
  
  call .......
  
  :loop
  call XXX
  if [%errorlevel%] == [0] (
      move /Y %1 %folder2%
      echo %errorlevel%
  )
  </code></pre>
  
  <p>Any ideas ?
  Thanks</p>