conforme @pk use pushd & popd, aqui está um exemplo.
use pushd para criar uma unidade virtual temporária e depois faça um popd para excluir a unidade virtual temporária
:selectFolder
REM Confirm which Folder structure
set /p location="Delete files for which QA environment: (P)retoria, (C)ape, (L)uanda or (Q)uit? (C/L/P/Q)"
REM I option allows for upper and lower case
if /I "%location%"=="C" set folder="\\Tfwcqa\tfwcqa\EORDERS"
if /I "%location%"=="L" set folder="\\Tfluaqa\tfluaqa\EORDERS"
if /I "%location%"=="P" set folder="\\Tfptaqa\tfptaqa\EORDERS"
if /I "%location%"=="Q" goto endBatch
REM you can not cd to a network drive so we use pushd to create a temporary virtual drive
REM cd /d %folder%
pushd %folder%
DIR /S
REM popd deletes the temporary virtual drive
popd