I was playing around in batch and I noticed that the script below doesn't return the same errorlevel for the same command.
I've had problems with the errorlevel variable before and I was wondering why this is happening
@echo off
cd C:\NotARealFolder & echo %errorlevel%
cd C:\NotARealFolder
echo %errorlevel%
pause