Windows Server 2003
1833883 Members
1978 Online
110063 Solutions
New Discussion

Re: Robocopy command line in script acquires defaults?

 
Fred Hinchliffe
New Member

Robocopy command line in script acquires defaults?

I assembled the following command line for execution in a VBS script:
Call oShell.Run("robocopy.exe " & sCopySource & " " & sCopyDestination & ssday & sopt)

where:
sopt = " /MIR /NP /LOG:e:\BackupCycles\carbon\robolog.txt"

When Robolog executes, I get a mish-mash of inconsistent options, most of which I did not ask for (as quoted from the log):
Options : *.* /S /E /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30

I understand the R and W, but why the S, E, PURGE ? Are they not redundant or even conflicting?
2 REPLIES 2
Marc Carney
Valued Contributor

Re: Robocopy command line in script acquires defaults?

Have a look through the Robocopy documentation which is very comprehensive and is free download.

I believe the /MIR is for mirror which implies some other options like /COPY:DAT /PURGE /S /E etc so perhaps it is just expanding the options in full for you.

Also, I remember that there is a switch for Robocopy that will save settings to registry creating a 'new' default. Perhaps it is reading the other settings /R: and /W: from whats in the registry on your PC.
The sheep tell me what I need to know
Joel Belizario
Trusted Contributor

Re: Robocopy command line in script acquires defaults?

Those retry and wait values are default for Robocopy if they are not specified explicitly in command line. I've had a number of copies still going when I've come back into the office for this reason... *doh*