Windows PowerShell Home
Move-Item Cmdlet can't move items between different PsDrives
7/11/2006 11:45:04 AM
User(s) can reproduce this bug
Move-Item Cmdlet can't move items between drives.
COM seems to have the same problem according to:
So this seems indeed to be related to the internal usage of some outdated API calls. This is limiting and disappointing.
How can this shell deserve the name PowerShell if it can't natively (i.e.
without some scripted workarounds) move folders from one drive to another.
Even Windows Explorer could do this 11 years ago (not sure about Fileman.exe
right now...). I don't care about different drives, all I care about are the
provided source and target path names and my files and folders being moved.
How often does this happen?
Have you seen this problem before in this product?
I don't know if this issue existed previously
PoSh 2 [E:/]
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 10.07.2006 21:30 foobar
PoSh 3 [E:/]
>move foobar c:
Move-Item : Der Quell- und Zielpfad müssen identische Stammverzeichnisse
haben. Es kann nicht datenträgerübergreifend verschoben werden.
At line:1 char:5
+ move <<<< foobar c:
#Source path and target path must have identical root directories.
#Can not move between drives.
The folder should be moved to the current directory of drive C:
to post a comment.
Please enter a comment.
on 7/15/2010 at 6:18 PM
This was erroneously closed as by design. It has been fixed in an upcoming version of the product.
on 5/1/2009 at 9:30 AM
Why don't you reopen the case for them to look at it again? You can edit it and set it to active. Hopefully they will then at least respond, because I agree that "By Design" is an excuse. Even "Postponed" would have been a better answer. Maybe it will make it to V2, but it didn't make it in V2 CTP3 in any case. Looking at the help in V2 CTP3 makes that clear.
"Move-Item will move files between drives that are supported by the same provider, but it will only move directories within the same drive."
on 6/5/2007 at 3:24 PM
I really hope "By Design" is only true for version 1.
The next version of PowerShell has to have this feature because everybody would expect this to work.
Everything else is just *not* intuitive.
on 8/14/2006 at 4:36 PM
I don't think "By Design" is the right resolution.
The product was /designed/ to have this limitation? What good does this limitation bring the user?
I could see "Won't Fix" as a resolution, but "By Design"?
to post a workaround.
Please enter a workaround.
on 12/7/2010 at 1:30 PM
Use this two step command:
Copy-Item -recurse $src $target -ErrorAction stop
Remove-Item -recurse -force $src -ErrorAction stop
© 2014 Microsoft