Jump to content

Need a script to copy a Folder into documents and setings


Recommended Posts

Posted

I am using a program called Cubase SE which has been set up with a specific configuration by the teacher which is required for all users who log onto the PCs in music suite. My problem is that the configuration files are stored within the local profile on each PC and a fresh config is created when a user logs on.

 

I need a script to copy the Config folder from a location into C:\Documents and Settings\%username%\Application Data for each user who logs onto the PC.

 

I have tried a few things but I am not sure of the exact syntax.

 

Any Ideas would be appreciated.

 

Many Thanks.

Posted

robocopy \\network\folder\Cubase "c:\documents and settings\%username%\application data\Cubase" /e

 

At a guess. This will require robocopy to exist on these music computers. this can be added to a standard logon script, or added to a script that only applies to these computers (by many methods)

 

fooby

  • 2 months later...
Posted

Mr FN-Greatermanchester sir, you need to learn to use google :D

 

Bung robocopy into google, first result is a detailed wikipedia article telling you where to get it, and how to use it! :D

 

Mike,

Posted

if it's just a single shortcut, just use the normal windows copy command,

 

i.e. something like;

copy \\servername\sharename\folder\shortcut.lnk "c:\documents and settings\%username%\start menu\programs\"

 

Mike.

Posted
Is that .bat format?

 

Cheers

 

Z

 

Yes. BAT or CMD because the script contains commands as you would type at the command prompt.

 

CMD scripts allow extra features to the batch script language introduced with Windows NT.

Posted

Put speech marks round the "\\fn.local\ . . . . " part as well as the destination. Reason for this, because it has spaces in it, my example didn't so I didn't type them.

 

Mike.

Posted

Now its this

 

copy "\\fn.local\SYSVOL\FN.local\shortcuts\Outlook Web Access.lnk" "c:\documents and settings\All Users\start menu\"

 

Still now having it

 

Thanks Manic for helping on the last couple of things i do appreciate it.

 

Z

Posted

I thought for a moment that copy may not work from unc paths, but just logged into work to try it, and it does.

 

Has the user running the script got write access to the 'all users' area? Check the permissions on the actual shortcut as well.

 

Just tried this copying from my sysvol share at work to a local c:\ folder, and it worked fine for me.

 

Mike.

Posted

Try changing it to the C:\ root to test it, and try a different location to copy from, or try it just copying a file locally until you find the bit that causing you problems.

 

Mike.

Posted

Are you running the copy command from a command prompt window or by typing it in the 'run' box.

 

Normally I'd expect an error in the command line box, not a windows error like you're getting.

 

Mike.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...