cookie_monster Posted October 6, 2009 Posted October 6, 2009 To save me reinventing the wheel does anyone have a script that will copy a folder from a network share to local that will run at station startup? I'd like to copy a default user folder from the server to the overwrite the local default user profile on clients at startup. Cheers.
IrritableTech Posted October 6, 2009 Posted October 6, 2009 xcopy "\\server\share\Default User" "c:\Documents and Setings\Default User" /y This should copy the contents of the folder. Create a bat file and run at startup... Although a robocopy script may reduce the startup time, as it can skip files that haven't been changed.
cookie_monster Posted October 6, 2009 Author Posted October 6, 2009 Hmmm I was trying to create a VBScript I hadn't thought about a Robocopy, can Robocopy be run from a share as well so it doesn't have to be on every station?
IrritableTech Posted October 6, 2009 Posted October 6, 2009 I like to keep things simple (just like me, I here everyone say), but to answer your question yes robocopy will run from a share. 1
cookie_monster Posted October 7, 2009 Author Posted October 7, 2009 It runs from a share and you can use variables excellent %logonserver%\NETLOGON\robocopy\robocopy "%logonserver%\NETLOGON\Default User" "C:\Documents and Settings\Default User" /E /PURGE /V /NP /R:10 /W:30
cookie_monster Posted October 7, 2009 Author Posted October 7, 2009 (edited) Ok that almost works flawlessly except that it won't run as a startup script and the logfile is blank. It does work if I specify 'servername' rather than %logonserver% but i'd rather distribute the load. Any ideas? EDIT Sorted it \\domainname.whatever\netlogon works and it puts a nice little log on C:\ \\domain.com.uk\NETLOGON\robocopy\robocopy "\\domain.com.uk\NETLOGON\Default User" "C:\Documents and Settings\Default User" /E /PURGE /V /NP /R:10 /W:30 >C:\robolog.txt Edited October 7, 2009 by cookie_monster
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