Jump to content

Recommended Posts

Posted

There are plenty of threads about this but..

 

The way our folder redirection for students is currently setup causes all of their home folders to show as "Documents" in the student share folder when viewed by staff. Causes confusion, as a workaround i've been telling them to enable the "Filename" column in file explorer..

 

I assume its caused by documents being redirected to the root of the home directory/home folder.

 

I'm wanting to find a proper solution for this now. What's the best practice for redirecting documents? I know I can change the redirect location to a subdirectory in their homefolder which will solve it, but how is the best way to go about moving their documents into the new folder? How reliable is the "move contents to new location"?

Posted

Oh man, I remember that being a problem with the roll out of Windows 7, but I can't for the life of me remember what it was.

 

Regarding folder redirection, we have it configured as follows:

 

User Configuration > Policies > Windows Settings > Folder Redirection
Setting: Basic - Redirect everyone's folder to the same location
Target folder location: Create a folder for each user under the root path
Root path: \\server.local\share$\2023

 

This will create a folder with each username in the root of the 2023 folder and create a Documents folder within that folder. For example, 23JSmith would have a Documents folder located in \\server.local\share$\2023\23JSmith\Documents.

 

I had an issue many years ago with the Downloads folder location and successfully used the "Move the contents of Documents to the new location" check box, which did move the files without issue. Though I would recommend testing it first.

Posted
Oh man, I remember that being a problem with the roll out of Windows 7, but I can't for the life of me remember what it was.

 

Regarding folder redirection, we have it configured as follows:

 

User Configuration > Policies > Windows Settings > Folder Redirection
Setting: Basic - Redirect everyone's folder to the same location
Target folder location: Create a folder for each user under the root path
Root path: \\server.local\share$\2023

 

This will create a folder with each username in the root of the 2023 folder and create a Documents folder within that folder. For example, 23JSmith would have a Documents folder located in \\server.local\share$\2023\23JSmith\Documents.

 

I had an issue many years ago with the Downloads folder location and successfully used the "Move the contents of Documents to the new location" check box, which did move the files without issue. Though I would recommend testing it first.

Yea i've had a nightmare with folder redirection previously which is why i've been hesitant to touch it thus far.. What you have suggested is 100% the correct way to go about it, but its the transition from how its setup now.

Posted
I remember this from my education days, I think it was something to do with the user.dat file in their home folder. But can't for the life of me remember the fix

 

I did see some other threads mentioning this - I can't see this file even with "hidden items" enabled in the file explorer view. I think this used to be the case in previous windows versions, but not anymore.

Posted
There are plenty of threads about this but..

 

The way our folder redirection for students is currently setup causes all of their home folders to show as "Documents" in the student share folder when viewed by staff. Causes confusion, as a workaround i've been telling them to enable the "Filename" column in file explorer..

 

 

This is caused by the documents folder being a special folder and the desktop.ini forces explorer to display it as Documents rather than its filename, there are two options I have found to resolve this:

 

1 Place the Documents folder one layer deep in the users home drive so they have a home fold which contains their documents folder, this is simple for the IT team but can confuse the users and requires changes to an existing set up.

 

2 Set the permissions on the desktop.ini files to deny for the Teachers/Administrators who want to navigate to these folders this prevents explorer from forcing the display name change, this is easier for the users but requires the administrator to change the permissions on all theses files, I believe I used a icacls command in a logon script when I had to do this.

Posted
1 Place the Documents folder one layer deep in the users home drive so they have a home fold which contains their documents folder, this is simple for the IT team but can confuse the users and requires changes to an existing set up.

 

I think this is the route i'd want to take, its just the logistics behind it getting it working with no hiccups. It's something that should be simple but really isnt

Posted
I think this is the route i'd want to take, its just the logistics behind it getting it working with no hiccups. It's something that should be simple but really isnt

 

Not at the school where I use this until tomorrow, but when I set up a new intake year I select all the users in the OU and do something like the below. First stage %username% and apply, second stage appends\Documents or IIRC it throws an error. NOTE: from memory, so may not be 100% accurate! If you've got some leavers you could stick in an OU, or you have time to create a few fake accounts, you could test. Works fine for new peeps, but I can't remember how I made the change when the problem/feature appeared to be sure what impact, if any, it had on long-time users. Can't remember any complaints, though. If you don't have 100s of OUs to deal with it shouldn't be too bad.

 

HomeFolder.png

  • 2 weeks later...
Posted
Moving documents to a subdirectory within their home folders sounds like a solid solution. As for moving the contents to the new location, the "move contents to new location" option is generally reliable, but it's always a good idea to back up important data beforehand, just to be safe. Have you considered testing it with a few student accounts first to see how it goes?
Posted

I have a script that will move all files into a subfolder called Documents, then you just change the AD element afterwards.

 

May need running over night or holidays when people aren’t using documents.

 

I’ll dig it out

Posted
I have a script that will move all files into a subfolder called Documents, then you just change the AD element afterwards.

 

May need running over night or holidays when people aren’t using documents.

 

I’ll dig it out

 

That would be great thank you

Posted

We have a log off script to delete Desktop.ini

 

$iniFile = "H:\Desktop.ini"

if (Test-Path -Path $iniFile){
   try {
       Remove-Item -Path $iniFile -Force -ErrorAction SilentlyContinue
   }
   catch {
       <#Do this if a terminating exception happens#>
   }
}

Posted
We have a log off script to delete Desktop.ini

 

$iniFile = "H:\Desktop.ini"

if (Test-Path -Path $iniFile){
   try {
       Remove-Item -Path $iniFile -Force -ErrorAction SilentlyContinue
   }
   catch {
       <#Do this if a terminating exception happens#>
   }
}

 

I would assume that this would work, however all of the folders I have checked do not have a .ini file (show hidden items checked in explorer)

Posted
I would assume that this would work, however all of the folders I have checked do not have a .ini file (show hidden items checked in explorer)

 

Have you disabled "Hide protected operating system files"?

  • Thanks 1
Posted
I would assume that this would work, however all of the folders I have checked do not have a .ini file (show hidden items checked in explorer)

The desktop.ini file is created when the user logs on, which is why we delete at log off.

  • Thanks 2
Posted

This is the script I use.

 

for /d %%Y in (Staff) do (for /f "usebackq tokens=*" %%U in (`dir /b /ad "%%~Y\*"`) do (robocopy "%%~Y\%%~U" "%%~Y\%%~U\Documents" /e /move /xd "Documents" /R:1 /W:1))

 

It's been a while but I think you need to save it as a .bat file and place in the root of the d:\Users\ folder. (assuming this is your location). Then run the batch by double clicking. It will loop through each folder in \Staff and move all files from \Staff\Joe.Bloggs to \Joe.Bloggs\Documents

 

If Staff is not your folder name, then change it in the brackets "for /d %%Y in (Staff)". You can use "for /d %%Y in (Intake???)" for wildcards if easier. I always called it per exact folder name so I know what it was hitting.

  • Thanks 2
Posted
This is the script I use.

 

 

 

It's been a while but I think you need to save it as a .bat file and place in the root of the d:\Users\ folder. (assuming this is your location). Then run the batch by double clicking. It will loop through each folder in \Staff and move all files from \Staff\Joe.Bloggs to \Joe.Bloggs\Documents

 

If Staff is not your folder name, then change it in the brackets "for /d %%Y in (Staff)". You can use "for /d %%Y in (Intake???)" for wildcards if easier. I always called it per exact folder name so I know what it was hitting.

 

Fantastic thank you - i will set up some users/folder structure to test this

Posted (edited)
I would assume that this would work, however all of the folders I have checked do not have a .ini file (show hidden items checked in explorer)

 

You need to view hidden system files.

 

EDIT Oooops I was a page behind.

Edited by speakercon

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...