Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 6
    Does that imply that using a .bat script would not return a ERRORLEVEL 0 value on a success? If that is true, I never noticed it. Commented Jul 1, 2013 at 16:22
  • 48
    I think it means that if ERRORLEVEL was set to non-0, then you run one of those commands, it will be left alone (non-0) in a .bat file but reset to 0 in a .cmd file. But, Windows being what it is, it's quite possible it actually causes a disembodied voice to tell you, in Pig Latin, "reset ERRORLEVEL yourself if you care so much!". Commented Jul 10, 2013 at 15:37
  • 8
    I think it is saying only those specific commands would do the different set/not set actions. Others will work like normal Commented Feb 4, 2014 at 22:41
  • 4
    Note - The APPEND command has been replaced with the undocumented DPATH command, although DPATH /? still lists the command as APPEND. Also, the Wiki article has since been mostly corrected, except it does not list DPATH. Commented Jan 22, 2016 at 17:32
  • 3
    The FTYPE command also clears the ERRORLEVEL to 0 only when executed by a .cmd script. Commented Jan 23, 2016 at 19:25