# Solved: Robocopy Does Not Work



## Teefermup (Jul 3, 2005)

I last used robocopy on 041209 and I updated my XP Home SP3 on 041609 and on 041909 I have found that robocopy does not work anymore. It will create the folder it is supposed to create but there are no contents in it. I have also tried xcopy and xxcopy and all they will do is the same. I repair reinstalled robocopy and the qui said "Please use Windows Update to check for any critical updates to the .NET Framework." This message was at the bottom of the gui and was a suggestion rather than a command about the .NET Framework updates. I have also run System File Checker. 

What could be keeping robocopy, xcopy and xxcopy from copying correctly?

Below Added 042709

I have found that by pasting the robocopy argument from the
command file into the Run box the backup occurs as expected.
But the command file when clicked on still does not do the
backup. Below are two versions that work when pasted into
the Run box.

robocopy C:\Annoyance C:\BackupAnnoyance

robocopy "C:\Annoyance" "C:\BackupAnnoyance" /COPYALL /V /NP /R:10 /W:30 

The results are the same when I use xcopy or xxcopy: clicking on the bat file does not backup anything but when I paste the bat files argument in the Run box the backup occurs.


Sincerely, Teefermup


----------



## Teefermup (Jul 3, 2005)

bump

===NET FRAMEWORK INSTALLS ( NUMBER AT END, 1, 3.5.ETC IS VERSION NUMBER )


Microsoft .NET Framework 3.5 SP1 4/16/2009 9:41:10 AM 3.5.30729 
Hotfix for Microsoft .NET Framework 3.5 SP1 (KB958484) 4/16/2009 9:41:10 AM 1 
Microsoft .NET Framework 3.0 Service Pack 2 4/16/2009 9:40:44 AM 3.2.30729 
Microsoft .NET Framework 2.0 Service Pack 2 4/16/2009 9:39:25 AM 2.2.30729


----------



## TheOutcaste (Aug 8, 2007)

So when you type it in the Run box it works.
Does it work if you open a Command Prompt, and type it there?
When you double click on the batch file, does a Command Prompt open but immediately close?
If it does, put a Pause statement as the very first line in the batch file.
With the Pause, does the Command Prompt stay open?

Jerry


----------



## Teefermup (Jul 3, 2005)

I type the below in a command prompt box:
robocopy C:\Annoyance C:\BackupAnnoyance,
and I get the below:
'robocopy' is not recognized as an internal or external command,
operable program or batch file.

When clicking on the batch file the command prompt box briefly 
flashes and then disapears.

When I use the PAUSE statement in the batch file the command
prompt box stays open and after I hit a key it disapears and no
backup occurs.

Is this problem caused by registry cleaning?


----------



## TheOutcaste (Aug 8, 2007)

It could be. The error says it doesn't know where the *Robocopy.exe* file is located. Which means the path statement is incorrect. A registry cleaner may have removed the path entry for the location of the *Robocopy.exe* file. This could also be why *Xcopy* doesn't work as well.
In a command prompt, type *xcopy /?* and see if you get the same error, or if it displays the help info.

Odd that it works from the RUN box; does the command you paste in there include the path to the *Robocopy.exe* file?
Do you know what folder the *Robocopy.exe* file is in?
Are you using the one from the Windows 2003 Resource kit, or the one from the Robocopy GUI?

If you installed the Win2k3 Resource kit, the default location is *C:\Program Files\Windows Resource Kits\Tools*.

You can check the path statement by opening a Command Prompt and typing *Set Path*
This will display the path statement. It should have at least these entries if you installed the Resource Kit:

```
Path=C:\Program Files\Windows Resource Kits\Tools\;[COLOR=Blue]C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem[/COLOR]
```
If the Windows\System32 entry is missing, that would explain why xcopy doesn't work.

Jerry

EDIT: The part in blue is the Default path that should always be present. Other entries are added by programs when they are installed.
You can make changes/corrections to the Path variable from System Properties:
Right click *My Computer*, click *Properties*
Click the *Advanced* tab, then click the *Environment Variables* button
Highlight the *PATH* entry under *System variables*, and click the *EDIT* button.
(There may be a *PATH* entry under *User variables for Username*. Entries in this section will only affect the currently logged on User)


----------



## Teefermup (Jul 3, 2005)

Thank you for your help. I may have never figured it out on my own.

I use the Robocopy GUI version. Robocopy is in System32 folder.
The argument from the robocopy bat file just starts with robocopy.

I type in a command prompt box: xcopy /?
and I get the below:

'xcopy' is not recognized as an internal or external command,
operable program or batch file.

For set path in a command prompt box I get the below:

C:\>set path
Path=;C:\Program Files\Iso Buster
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

(How in the world can the Path be set to the above? I have been using Iso Buster for several days now but do not know exactly when I began using it.)

I googled path variable and got it for XP (from http://vlaurie.com/computers2/Articles/environment.htm) and pasted it in and rebooted and now robocopy works!

C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem

Sincerely, Teefermup (Happy Now!)


----------



## TheOutcaste (Aug 8, 2007)

Guess I should have highlighted the part was was the default, but you found it.

Glad I could help.

Jerry


----------

