title: Move Redirected User Documents to a new folder location at a different folder level
body: <p>Our company is in the middle of a server transition. I am need some help with a little bit of an issue i ran into.</p>
  
  <p>First off. Or existing domain is using Folder Redirection for their "My docs" etc. The original setup was done to the users home folder. ( ex. \server1\users\%username%*.* )</p>
  
  <p>We are migrating everything over to a entirely new domain. Use accounts were created from sratch instead of migrated. We do need to move all the user documents to the associated folders. The usernames are identical but the location is differently laid out ( ex. \server2\users\%username%\My Documents*.* ) Basically we created a folder within their home folder to house their documents. This was mainly because of the whole "My documents" labeling that shows with Windows 7 as well as easy way to differentiate the folder on Mac systems.</p>
  
  <p>So I started using RichCopy to push the files manually entering each users source and destination since they did not match. Does anyone have a way i could make it so that it has a certain variable to account for.</p>
  
  <p>In theory:
  \server1\users\%username%\ 
  moves to
  \server2\users\%username%\My Documents\</p>
  
  <p>The variable would search the usernames, match them up, and push automatically for every folder within \users\</p>
  
  <p>Any type of GUI interface program or even a powershell script that i can manipulate a little would be super helpful. I can't see doing this manually for each user, we have around 1000 users.</p>
  
  <p>I great appreciate any help ahead of time!</p>
  
  <p>So far I have been working with Powershell to run Robocopy to perform this action.
  I am trying to make the powershell pull the usernames from a csv and input it into the robocopy string. Here is my code:</p>
  
  <pre><code>    $usernames = import-csv c:\scripts\usernames.csv
  
  
   foreach($user in $username)
  
     {
  
      $field1 = $user.username
  
  
     Echo "$field1"
  
     }
  
  $source = "\\server03\Staff-MyDocs\$user"
  $destination = "\\server3\users$\Staff\$user\My Documents\"
  
  robocopy $source $destination /S /E /COPY:DATSOU /R:1 /W:5 &gt;C:\scripts\HomeDir_robocopy.log
  </code></pre>
  
  <p>Any better ideas to make this work??</p>