I would suggest pushdover cdin this case. This way you can restore the previous directory with popdat the end. If the batch file should not actually change the path even after running it, I always return it at the end of the package:
@echo off
rem change current directory
pushd C:\Temp\Code
rem ...
rem something your batch needs to do
rem ...
rem restore old working directory
popd
source
share