Wait a minute. You're using pushd
. pushd
, as the documentation states:
If Command Extensions are enabled the
PUSHD command accepts network paths in
addition to the normal drive letter
and path. If a network path is
specified, PUSHD will create a
temporary drive letter that points to
that specified network resource and
then change the current drive and
directory, using the newly defined
drive letter. Temporary drive letters
are allocated from Z: on down, using
the first unused drive letter found.
While that's perfectly fine to use, you should never call pushd
without an appropriate popd
afterwards.
So instead of just
pushd \\somepath\etc
xcopy "%mycopyposition%*.exe"
you add another line
popd
which will de-allocate the temporary drive letter again.