CMD MOVE can't replace directories in WIN 7 [duplicate]

Solution 1:

At last.. here is the solution.. Thanks for help guys :)

SET mydir=C:\mydir
IF EXIST "%mydir%\%~n1\" (
  ROBOCOPY %1 "%mydir%\%~n1" /E /IS /MOVE
) ELSE (
  MOVE /Y %1 "%mydir%\"
)