Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Robocopy folder?

Status
Not open for further replies.

pinkpanther56

Technical User
Jun 15, 2005
807
GB
I'd like to copy a folder at station startup, I can make it work with one command but not another. I'd like to use the %logonserver% variable to distribute the load, this works when I run the command manually but not as a station startup script.

This works

Code:
\\server\NETLOGON\robocopy\robocopy "\server\NETLOGON\Default User" "C:\Documents and Settings\Default User" /E /PURGE /V /NP /R:10 /W:30 >C:\robolog.txt

This doesn't

Code:
%logonserver%\NETLOGON\robocopy\robocopy "%logonserver%\NETLOGON\Default User" "C:\Documents and Settings\Default User" /E /PURGE /V /NP /R:10 /W:30 >C:\robolog.txt

I've tried with and without \\ in front of %logonserver%

Can anyone tell me if this will be possible? I'm assuming that a client must have a logonserver set at startup to pull down GPOs.

Thanks.
 
Sorted it using the domain share for netlogon rather than %logonserver%

Code:
\\domainname.whatever\netlogon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top