deano Posted June 21, 2012 Posted June 21, 2012 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!
FN-GM Posted June 21, 2012 Posted June 21, 2012 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.
GAS Posted July 2, 2012 Posted July 2, 2012 Hi, First make all user name text file using this command, make batch file and just run. dir /a:D /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. 1
deano Posted July 3, 2012 Author Posted July 3, 2012 Thanks, i will take a look and let you know how i get on!
rckngslnd Posted January 17, 2013 Posted January 17, 2013 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??
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