Jump to content

Batch file errorlevel reporting 0 but it should be 1 - right?


Recommended Posts

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?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy