Question Locked

MOVE command is giving me

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to create a batch file to move large (10GB+) directories around off hours.

I wanted to test my commands so I created a test folder and tried to move it from one server to another. When dragging and dropping through windows explorer it works, but when going through cmd shell, I get an "access is denied" message.

Is it because I am using mapped drives? So I am connected to server 1 right now, trying to move 'test' folder to server 2 which is mapped to drive z: So i put in, "move d:\test z:\" to which I get access is denied.

But like I said, if I go into windows explorer on server 1, open up D:\ select 'test' folder and drag it over to Z: , it works fine.

Edit: its not the mapped drive, cause I tried moving it from d: to c: and got the same message.

3 replies

by lowlands

That with move you can only rename a directory on the same drive/disk.
So move d:\test d:\test2 will work, but not if the destination is another drive.

Try to copy it to it's new location and then delete the old directory.
Something like: xcopy c:\test d:\test /E /I followed by rmdir /S /Q c:\test should do the trick

This discussion is closed to new replies.