+ Post New Thread
Page 3 of 3 FirstFirst 123
Results 31 to 39 of 39
Windows 7 Thread, Windows 7 renamed our user network folders to my documents in Technical; Actually I've decided to have a session moving all the user areas. Bit of excel, bit of robocopy and I ...
  1. #31

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,676
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    45
    Actually I've decided to have a session moving all the user areas.

    Bit of excel, bit of robocopy and I can move all the data into a drive:\users\username\documents folder fairly quicly and then Win7 can do what it wants.

  2. #32

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,944
    Thank Post
    862
    Thanked 1,442 Times in 991 Posts
    Blog Entries
    47
    Rep Power
    616
    I've not seen any ill effects from just setting a logoff script to delete it from My Documents...
    Code:
    On Error Resume Next
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    DocsPath = WSHShell.SpecialFolders("MyDocuments")
    
    If FSO.FileExists (DocsPath & "\desktop.ini") Then
      FSO.DeleteFile (DocsPath & "\desktop.ini")
    End If
    Unless anyone wants to tell me why that's a bad idea before Win7 goes out over the six weeks.

  3. #33

    Join Date
    Feb 2007
    Posts
    196
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    17
    We have had windows 7 for over a year now and i have used file screening to prevent it being added. the problem you hae is that is slows login times down considerably.

    I guess that adding the file name column is the easiest way but we use mandatory profiles so staff will need to do this ebery time.

    Is there a setting for this in gp.

  4. #34

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340
    Quote Originally Posted by Liam View Post
    Is there a setting for this in gp.
    No unfortunately and I have checked. Microsoft have missed this one.

  5. #35

    Join Date
    Jan 2012
    Location
    Bedfordshire
    Posts
    12
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by sonofsanta View Post
    I've not seen any ill effects from just setting a logoff script to delete it from My Documents...
    Code:
    On Error Resume Next
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    DocsPath = WSHShell.SpecialFolders("MyDocuments")
    
    If FSO.FileExists (DocsPath & "\desktop.ini") Then
      FSO.DeleteFile (DocsPath & "\desktop.ini")
    End If
    Unless anyone wants to tell me why that's a bad idea before Win7 goes out over the six weeks.
    I use this and the adding of the name column.. all works well.

  6. #36

    Join Date
    Feb 2007
    Posts
    196
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    17
    I have decided to go with the sub folder option in the user documents

    What is the easist way to achieve this.

    There is a group policy option to prevent student saving to their root folder that i will apply.

    i want to create a folder called documents and then transfer all the work into that.

  7. #37
    macdaddy's Avatar
    Join Date
    Apr 2010
    Location
    New Hampshire
    Posts
    17
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by cromertech View Post
    I created a little database that opens the students home folder for the teachers. All they do is put the name in. It took a while to do but as I had excel spreadsheets with all usernames generated on it anyway it's been a useful tools for me too. Added a section so I can get passwords as well as we set them in year 7 for the whole time a student is with us.
    We have moved all staff/students files from 2003 R2 servers to 2008 R2 making the adjustments below and working fine.

    1. Manually create a "My Documents" subfolder in the user's home folder. Maybe someone has a script to do this.
    2. Move all files into the sub folder.
    3. Delete the desktop.ini file at the root of the users home folder. NOTE: This can be tricky on 2008 R2. The "ownership" will mess things up. More steps to take ownership and delete. If scripted much easier.
    4. The folder redirect will point to the sub folder. exp=\\servername\share\%USERNAME%\My Documents

    Since implementing this we have had no issues. Yes it took a lot of work but this is the permanent fix to the issue. I do not see M$ changing this as they see this to be correct 'by design'.

    Also to check permissions and verify the 'desktop.ini' file does not mess you up use the NTFSFix tool which you can find at WiseSoft - Resources for IT Professionals. This is a creat tool to update/change/add permissions quickly.

    Bob
    Systems Specialist

  8. #38

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,944
    Thank Post
    862
    Thanked 1,442 Times in 991 Posts
    Blog Entries
    47
    Rep Power
    616
    Script to move folders (will need tweaking with relevant details)

    First grab the details of all your users:
    Code:
    cd \
    dsquery user -limit 0 "ou=Students,ou=Users,ou=School,dc=domain,dc=local" | dsget user -hmdir >students.txt
    - change the ou= part to reflect your OU structure. I broke it down into staff and students to reduce the load and split the work but you should be able to do the lot at once.

    Copy and paste the contents of that text file into Excel, tidy it up so you just have a long list of home directory paths. In the second column use =CONCATENATE() to construct the new path, e.g. =CONCATENATE(A2,"Documents/") and drag that down the whole list.
    Title the first column oldhmdir and the second column newhmdir

    Save that as a CSV somewhere onto a domain controller - C:\Scripts\students.csv for example - then open up a powershell on that domain controller. Copy and paste the following code into it:
    Code:
    cd \
    cd Scripts\
    $inputFile = Import-CSV  C:\Scripts\students.csv 
    foreach($line in $inputFile) 
    {
        robocopy /move $line.oldhmdir $line.newhmdir /s /MINAGE:1
        Write-Host "`n"
    }
    The minage is set so it doesn't try and move the new folder (hopefully), other flags listed @ Robocopy

    It may need some tweaking (I was copying from one location to another, not trying to move content down a level) but the gist of it should be right, anyway. Will save you trawling through hoards of folders. Test it by using a copy of the CSV with all but the top two or three lines deleted so it doesn't take too long to fail or mess too much up.

    EDIT: @macdaddy - new directories can be created programatically (in PowerShell, at least) with
    Code:
    New-Item $UNC_PATH -type directory
    Last edited by sonofsanta; 3rd August 2012 at 01:45 PM.

  9. #39

    Join Date
    Feb 2007
    Posts
    196
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    17
    Quote Originally Posted by sonofsanta View Post
    Script to move folders (will need tweaking with relevant details)

    First grab the details of all your users:
    Code:
    cd \
    dsquery user -limit 0 "ou=Students,ou=Users,ou=School,dc=domain,dc=local" | dsget user -hmdir >students.txt
    - change the ou= part to reflect your OU structure. I broke it down into staff and students to reduce the load and split the work but you should be able to do the lot at once.

    Copy and paste the contents of that text file into Excel, tidy it up so you just have a long list of home directory paths. In the second column use =CONCATENATE() to construct the new path, e.g. =CONCATENATE(A2,"Documents/") and drag that down the whole list.
    Title the first column oldhmdir and the second column newhmdir

    Save that as a CSV somewhere onto a domain controller - C:\Scripts\students.csv for example - then open up a powershell on that domain controller. Copy and paste the following code into it:
    Code:
    cd \
    cd Scripts\
    $inputFile = Import-CSV  C:\Scripts\students.csv 
    foreach($line in $inputFile) 
    {
        robocopy /move $line.oldhmdir $line.newhmdir /s /MINAGE:1
        Write-Host "`n"
    }
    The minage is set so it doesn't try and move the new folder (hopefully), other flags listed @ Robocopy

    It may need some tweaking (I was copying from one location to another, not trying to move content down a level) but the gist of it should be right, anyway. Will save you trawling through hoards of folders. Test it by using a copy of the CSV with all but the top two or three lines deleted so it doesn't take too long to fail or mess too much up.

    EDIT: @macdaddy - new directories can be created programatically (in PowerShell, at least) with
    Code:
    New-Item $UNC_PATH -type directory
    Thanks. I achieved this by exporting a user list from ad then using robycopy I then created a and for every user and set it to copy all work into a new documents folder.

    Got the robocopy commands if anyone wants them

SHARE:
+ Post New Thread
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Windows 7 delete/hide Local Documents Folders
    By thatley in forum Windows 7
    Replies: 15
    Last Post: 24th September 2013, 04:13 PM
  2. Need To Move The Network Documents Folder (Every User Account)
    By pritchardavid in forum Windows Server 2000/2003
    Replies: 10
    Last Post: 11th May 2010, 06:33 PM
  3. Replies: 0
    Last Post: 29th August 2009, 12:39 PM
  4. User Network Folders
    By OllieC in forum Windows
    Replies: 7
    Last Post: 4th August 2009, 04:15 PM
  5. Problem with user My Documents folders
    By misterchris in forum Windows
    Replies: 2
    Last Post: 24th May 2009, 02:53 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •