Olliedawg Posted June 5, 2024 Posted June 5, 2024 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"?
CHiLL Posted June 5, 2024 Posted June 5, 2024 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.
triggmiester Posted June 5, 2024 Posted June 5, 2024 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
Olliedawg Posted June 5, 2024 Author Posted June 5, 2024 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.
Olliedawg Posted June 5, 2024 Author Posted June 5, 2024 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.
msi_school Posted June 5, 2024 Posted June 5, 2024 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.
speakercon Posted June 5, 2024 Posted June 5, 2024 I've previously used a bat file run every few minutes to remove all the desktop.ini files.
Olliedawg Posted June 5, 2024 Author Posted June 5, 2024 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
LeMarchand Posted June 5, 2024 Posted June 5, 2024 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.
DavonPotter Posted June 17, 2024 Posted June 17, 2024 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?
snagrat Posted June 18, 2024 Posted June 18, 2024 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
Olliedawg Posted June 18, 2024 Author Posted June 18, 2024 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
Davit2005 Posted June 18, 2024 Posted June 18, 2024 Wasn't this issue down to the desktop.ini file from vague memory?? Had this issue to, I think we ended up telling staff to enable the file location nd then I am pretty sure we deleted the desktop.ini file every night. https://community.spiceworks.com/t/prevent-desktop-ini-files-being-created-in-documents-folder/955064/9http://
altecsole Posted June 18, 2024 Posted June 18, 2024 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#> } }
Olliedawg Posted June 18, 2024 Author Posted June 18, 2024 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)
LeMarchand Posted June 18, 2024 Posted June 18, 2024 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"? 1
Olliedawg Posted June 18, 2024 Author Posted June 18, 2024 Have you disabled "Hide protected operating system files"? doh, no.. thank you
altecsole Posted June 18, 2024 Posted June 18, 2024 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. 2
Olliedawg Posted June 18, 2024 Author Posted June 18, 2024 The desktop.ini file is created when the user logs on, which is why we delete at log off. I shall give your script a test, thank you
snagrat Posted June 18, 2024 Posted June 18, 2024 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. 2
Olliedawg Posted June 18, 2024 Author Posted June 18, 2024 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
speakercon Posted June 18, 2024 Posted June 18, 2024 (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 June 18, 2024 by speakercon
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now