Windows Thread, Script to copy folder in Technical; To save me reinventing the wheel does anyone have a script that will copy a folder from a network share ...
6th October 2009, 11:15 AM #1
Script to copy folder
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.
6th October 2009, 11:49 AM #2
This should copy the contents of the folder. Create a bat file and run at startup...
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.
6th October 2009, 11:52 AM #3
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?
6th October 2009, 11:59 AM #4
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.
Thanks to IrritableTech from:
cookie_monster (6th October 2009)
7th October 2009, 10:13 AM #5
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
7th October 2009, 10:52 AM #6
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.
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
Last edited by cookie_monster; 7th October 2009 at 11:43 AM.
By MicrodigitUK in forum Scripts
Last Post: 29th January 2009, 12:43 PM
By jamin100 in forum Scripts
Last Post: 4th September 2008, 07:38 PM
By FN-GM in forum Scripts
Last Post: 23rd February 2008, 01:08 PM
By sradams1977 in forum Scripts
Last Post: 29th December 2007, 10:53 PM
By tosca925 in forum How do you do....it?
Last Post: 2nd October 2006, 08:15 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)