Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to move a huge list of directories from disk C (internal) to disk E (usb) on a Windows Server 2008 box. I'd planned to just make a big .bat file with thousands of "move" commands. Low-tech, but seems simple enough.

But if I type "move c:\myDir e:\", I get "access denied" -- even if I'm logged in as Administrator, running an elevated-permissions cmd.exe.

I granted Administrator Full Control on both C and E; still access denied.

If I drag the directories using the GUI, it works fine.

What am I missing?

share|improve this question
Not sure, but I would strongly suggest you consider robocopy with the /move option. – Zoredache Aug 25 '10 at 16:33
Robocopy wants to move the contents of the directory -- couldn't figure out how to make it move the directory itself. – Jesse Aug 25 '10 at 17:14
are you trying to flatten out the directory structure? If not then you could just use xcopy . driveletter:\ /s/e/v. But I don't understand why robocopies not working either. – tony roth Aug 26 '10 at 0:05
robocopy works well: robocopy c:\test f:\test – Grizly Aug 26 '10 at 2:58

The help for the "move" command says that it "Moves files and renames files and directories." It does not say that the "move" command moves directories.

From the CLI, you can use copy c:\mydir e:\ /s and then rmdir c:\mydir /s.

I would suggest using robocopy c:\mydir e:\ /move /s. robocopy is available on any modern installation of windows and provides useful feedback when copying large amounts of data.

If you are using Powershell and not cmd.exe, you could easily write a little helper function or alias to help shorten/simplify the commands.

share|improve this answer

I am not a windows admin, so please take my answer with a grain of salt, this is an "out of the box" sort of approach. I was recently backing up a friends computer to do a re-install and was having similar problems (though I was copying, not moving). After getting completely fed up with permissions getting in the way regardless of the user I was logged in as, I gave up and booted a Fedora Live CD, mounted the NTFS volume and copied the contents over using that.

If Linux isn't your choice, you could try something like Bart PE which would give you an alternate environment to perform the work on the filesystem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.