header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Moving FOLDERS across Volumes
Last Post 16 Mar 2010 12:37 AM by rutherda123. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
rutherda123User is Offline
New Member
New Member
Posts:2
Avatar

--
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
    PoSherLifeUser is Offline
    Basic Member
    Basic Member
    Posts:364
    Avatar

    --
    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

    rutherda123User is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    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.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer