I have been trying to do the same from a network share.
SET MoveDirSource=\\Server\Folder
SET MoveDirDestination=Z:\Folder
Here are my findings and solution from tests on a Windows 7 machine.
Suggestion:
ROBOCOPY "%MoveDirSource%" "%MoveDirDestination%" /MOVE /E
Problem: Moves source folder.
Suggestion:
ROBOCOPY "%MoveDirSource%" "%MoveDirDestination%" /MOVE /E /XD "%MoveDirSource%"
Problem: Still moves source folder.
Suggestion:
ROBOCOPY "%MoveDirSource%" "%MoveDirDestination%" /MOV /E
Problem: Leaves empty folder structure behind in source folder.
Working solution:
MKDIR "%MoveDirDestination%"
FOR %%i IN ("%MoveDirSource%\*") DO MOVE /Y "%%i" "%MoveDirDestination%\%%~nxi"
FOR /D %%i IN ("%MoveDirSource%\*") DO ROBOCOPY /MOVE /E "%%i" "%MoveDirDestination%\%%~nxi"
First two lines move top level files, the third moves folders. Note the double %% is for usage in a batch file, pasting into a command line needs these changed to a single percentage mark.
~nxi in the destination is a FOR SUBSTITUTION VARIABLE ( See FOR /? ) where ~nxi represents the name and extension of the item currently being looped through.
Robocopy defaults to RETRY A MILLION times and WAIT 30 SECONDS between each try, so you may wish to add /R:1 /W:1 to the robocopy arguments.