I understand that this question has been asked multiple times. But even after using pushd and popd, I am unable to resolve this at my end. My code is specified below. I could see multiple network drives under My Computer getting mapped, but I would like to have only 1 drive getting mapped for each for loop iteration. Please let me know what am I doing wrong?
@echo off
for /d %%a in (\\MIGRATE01\content\*) do (
pushd "%%a"
set x=%%~nxa
echo no_match=E:\Nomatch\%%~nxa\)>"E:\Testing\prop_file1.txt"
E:\oracle1_run.bat --context=Default --context_param prop_file=E:\Testing\prop_file1.txt
popd
)
popd
del "E:\Testing\prop_file1.txt"