Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
General PowerShell
Moving FOLDERS across Volumes
Last Post 16 Mar 2010 12:37 AM by
rutherda123
. 2 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
rutherda123
New Member
Posts:2
07 Mar 2010 09:32 PM
Hello, I am trying to find the Powershell command to move FOLDERS across Volumes. eg. I want to move a folder (and it's contents) from c:\temp to d:\temp but I can't find the command to do it. Move-Item doesn't support moving folders across volumes. Any help would be appreciated, thanks. David
PoSherLife
Basic Member
Posts:364
08 Mar 2010 08:03 AM
You'll need to do the move in two stages - and not use Move-Item. Copy the content with "Copy-Item -recurse", then Remove-Item to get rid of the data in the original location.
When at first you don't succeed
Step-Into
http://theposherlife.blogspot.com
http://www.jandctravels.com
rutherda123
New Member
Posts:2
16 Mar 2010 12:37 AM
thanks for that cruisader. I decided to use robocopy and the wscript.shell objects: $strRobocopy = "cmd /c c:\robocopy.exe %OLDPath% %newPATH% /E /Z /MOVE /IPG:50 /R:3 /W:5 /LOG+:"robocopy.log" $Wscript = new-object -com wscript.shell $Wscript.run($strRobocopy,2)
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
General PowerShell
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2