cookie_monster (6th October 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.
This should copy the contents of the folder. Create a bat file and run at startup...Code:xcopy "\\server\share\Default User" "c:\Documents and Setings\Default User" /y
Although a robocopy script may reduce the startup time, as it can skip files that haven't been changed.
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?
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.
cookie_monster (6th October 2009)
It runs from a share and you can use variables excellent
Code:%logonserver%\NETLOGON\robocopy\robocopy "%logonserver%\NETLOGON\Default User" "C:\Documents and Settings\Default User" /E /PURGE /V /NP /R:10 /W:30
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:\
Code:\\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
Last edited by cookie_monster; 7th October 2009 at 11:43 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)