So I just wrote a quick python script to move some large directories around (all on the same drive), incorrectly assuming windows command line tools weren't a complete joke and that move Root\Dir1 Root\Dir2
would, like windows explorer GUI, merge the contents. I really don't care whether it replaces or skips duplicate files within the folders because there aren't any.
Unfortunately (in an admin command prompt),
C:\>mkdir a
C:\>mkdir b
C:\>mkdir b\a
C:\>move b\a .
Overwrite C:\a? (Yes/No/All): yes
Access is denied.
... :O
... ?? really ??!?
... no, actually really really ???
It seems the only way is to copy and delete. Painfully pathetic.
Related:
How can I move the contents of one directory tree into another?
how do i fix: 'access denied' with the move command in windows 7?
I'm not writing code to copy files one by one. Is there any way to achieve a folder move with replace without copying?
I'd prefer to use some native executable if possible. I'd also be quite happy to use python if it supported it.