UNC Paths Not Supported in called batch file
<p>The purpose of the batch files is to loop through a directory, move all files with a modified date between x and y to a temp directory (located in an archive folder), create a .zip from temp directory, then finally delete the temp directory. </p>

<p>I am calling a batch from a batch. The initial batch uses pushd to retrieve the network path, but then when the next batch is called and the forfiles is used to move files into an archive, the UNC path error is thrown. "ERROR: UNC paths (\machine\share) are not supported."</p>

<p>The two .bat files are in the same directory in the shared network.</p>

<p>I have read the other answer for this similar issue, but none of the answers fix my problem. </p>

<p>First batch file:</p>

<pre><code>@echo off
setlocal EnableExtensions
cls 
@pushd %~dp0

:firststep
........
code....
........
echo Calling...
CALL ArchiveTool.bat %MM% %yyyy% \\riskview\EBSArchive
echo Press any key to process next directory...
pause &gt;nul
</code></pre>

<p>To here everything works properly. </p>

<p>Failing batch:</p>

<pre><code>@echo off
setlocal EnableExtensions
.......
Code...
.......
md %3\Archive\%1-%2
forfiles /P %3 /D +%1/1/%2 /C "cmd /c if /I @FDATE LSS %mm%/1/%2 move @file                
%3\Archive\%1-%2 &gt;NUL &amp; echo|set /p=."
</code></pre>

<p>The directory is successfully created, but the forfiles fails.</p>