+ Post New Thread
Results 1 to 6 of 6
Windows Server 2008 Thread, Move Files with User Home Folder on Bulk in Technical; Users on our network from previous years have home folders set up as follows: \servername\staffshare\username\files This is fine for a ...
  1. #1

    Join Date
    Feb 2007
    Location
    Wolverhampton
    Posts
    330
    Thank Post
    18
    Thanked 35 Times in 33 Posts
    Rep Power
    21

    Move Files with User Home Folder on Bulk

    Users on our network from previous years have home folders set up as follows:

    \\servername\staffshare\username\files

    This is fine for a windows xp but with Windows 7 it needs a different layout to benefit the libraries. In my setup for the last couple of years, i have used my approach which is to use the follwoing:

    \\servername\staffshare\username\documents\files

    This works really well and removes the issue with seeing My Documents for folder names. What i want to do now is create the same structure for previous years homefolders, but i will need to move the files into documents. Has anybody done this before on mass with a script or tool. Any help will be greatly appreciated!

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,846
    Thank Post
    876
    Thanked 1,680 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    444
    Yep i did it at Easter for 1500 users. I will see if i can find my scripts. It did require abit of excell work though.

  3. #3

    Join Date
    Feb 2007
    Location
    Wolverhampton
    Posts
    330
    Thank Post
    18
    Thanked 35 Times in 33 Posts
    Rep Power
    21
    Any luck with those scripts my friend?

  4. #4
    GAS
    GAS is offline

    Join Date
    Jan 2008
    Location
    Guildford
    Posts
    60
    Thank Post
    16
    Thanked 14 Times in 12 Posts
    Rep Power
    16
    Hi,

    First make all user name text file using this command, make batch file and just run.

    dir /a /B /-p /o:gen >weather.txt

    above will make all folder lict to txt file call weather


    You have to have robo copy s well
    Download form: Download: Windows Server 2003 Resource Kit Tools - Microsoft Download Center - Download Details
    ================================================== =
    Make bat file with this in to it

    for /f "tokens=*" %%v in (\\MY-SERVER-NAME\c$\weather.txt) do (
    IF EXIST "\\MY-SERVER-NAME\d$\Students\11\%%v\My Documents" GOTO ROBOCOPY
    )

    Els

    for /f "tokens=*" %%v in (\\MY-SERVER-NAME\c$\weather.txt) do (
    mkdir "\\MY-SERVER-NAME\d$\Students\11\%%v\My Documents"
    )

    :ROBOCOPY
    for /f "tokens=*" %%v in (\\MY-SERVER-NAME\c$\weather.txt) do (
    "\\MY-SERVER-NAME\c$\robocopy" "\\MY-SERVER-NAME\d$\Students\\%%v" "\\MY-SERVER-NAME\d$\Students\11\%%v\My Documents" /COPYALL /MOVE /B /E /V /FP /LOG+:"\\MY-SERVER-NAME\c$\Z\%%v.txt" /R:1 /W:3 /XJ /NDL /XD "My Documents" "My Data Sources" "My Music" "My Videos" "Profile" "My Pictures"
    )

    ===============================================

    On first part of batch file this will look all the users on txt file call weather.txt and see if it has folder called “My Documents” if it find then it go to third part (Robocopy) if not fount it will create new folder called “My Documents” and copy all files

    On part 3 batch file read the txt file and move all file and folder to folder called “My Documents” (for switches please look this site Robocopy
    Also create folder called “Z” (I chose this so it appear at the bottom of the list) so when it copy it will create log file what it has copied or if there is any problem
    LOG+:"\\MY-SERVER-NAME\c$\Z

    If you require further help just pm me you phone no and I call you.

    Hope this help.

  5. Thanks to GAS from:

    deano (3rd July 2012)

  6. #5

    Join Date
    Feb 2007
    Location
    Wolverhampton
    Posts
    330
    Thank Post
    18
    Thanked 35 Times in 33 Posts
    Rep Power
    21
    Thanks, i will take a look and let you know how i get on!

  7. #6
    rckngslnd's Avatar
    Join Date
    Nov 2010
    Location
    Margate
    Posts
    47
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi

    Thanks for script, i tried this on a windws 7 pc also on a server 2012 server, for me it copy all files as it meant to but not when you check permission on any files been copied, it has not inherfited any permisions form the parent folder, any ideas??

SHARE:
+ Post New Thread

Similar Threads

  1. Folder structure of user's home folders on the servers
    By Bruce123 in forum Windows Server 2000/2003
    Replies: 6
    Last Post: 30th September 2011, 10:59 AM
  2. Replies: 3
    Last Post: 4th November 2008, 03:30 PM
  3. User home folder, unsure of problem
    By itschad in forum Wireless Networks
    Replies: 4
    Last Post: 12th September 2008, 05:03 PM
  4. Moodle: Users home folders
    By timbo343 in forum Virtual Learning Platforms
    Replies: 15
    Last Post: 15th July 2008, 03:38 PM
  5. Users Home Folder and Network Drive
    By lovelldr in forum Windows
    Replies: 6
    Last Post: 6th August 2007, 10:17 AM

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
  •