Chris Posted May 14, 2006 Report Share Posted May 14, 2006 rmdir /q /s "K:\Application Settings\Opera Settings\profile\"IF ERRORLEVEL 1 ECHO An error occurred whilst deleting...The rmdir does remove the directory but the errorlevel also gets called, but the errorlevel is 1 which should only appear if the removal of the directory fails.So why does it appear, if the directory gets deleted? Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted May 15, 2006 Report Share Posted May 15, 2006 Not quite sure what your question is; the information in the title seems to be opposite from the text below.If errorlevel is 0 instead of 1, then I suspect the /s option is causing it.If errorlevel is 1 instead of 0, then we have a problem. Quote Link to comment Share on other sites More sharing options...
Chris Posted May 15, 2006 Author Report Share Posted May 15, 2006 I removed the /s and it's still the same...The batch file seems to report an errorlevel of 0 as the directory gets removed. Which is fine...But the errorlevel 1 seems to get called as if the deletion of the directory failed... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.