Redirecting documents folder for windows 7

folder-redirectiongroup-policywindows-server-2008

I have a GPO set to redirect the Documents folder to the H: drive of our students. It works, but conditionally. If the student already has My Pictures, My Videos, and/or My Music folders already in existence within their H: drive, then Documents will not redirect as it automatically creates those folders within. If I delete those three folders from the student's drive, then the folder redirection will then activate. Obviously it is not practical to go into each student's folder and delete these out of there. Is there a workaround or something I am missing?

The policy is set for Basic-Redirect everyone's folder to the same location
pointing to the target location of the user's home drive.

Under the settings of the GPO, all 3 boxes are checked and Policy Removal has "Leave the folder in the new location when policy is removed" selected.

Best Answer

You're in a conundrum. There is no easy fix. You could, however:

  1. build a new temporary share (e.g. \server\temporary share\user$ )
  2. migrate all users "My Pictures/Videos/Music" to the temporary share
  3. keep existing H drive/My Documents mapped
    • a) build a script to map the temporary share to the user's profile on log on
    • b) build a script to robocopy user's documents from temporary share to H drive, deleting the files in the temporary share when copy is complete
    • c) add both scripts to a new GPO
  4. have a user log in and watch files move
  5. build a script to delete empty directories in temporary share
  6. Monitor the temporary share with a script or directory monitoring software and remove the temporary share when all user folders in the temporary share are empty.

Obviously, you'd want to test this in a controlled environment before deploying to a live environment.