12

a service is running on many servers and on some machines I need another set of plugins than on other machines for this service.

On all those hosts there is already the folder with some plugin files needed for that host. Now I need to update those from one single source.

It is important that robocopy only copies the file from the source that are already in the folder on the server, and not any additional files.

I thought the /XX flag would do this, but it doesn't work for me.

This is the command I used:

robocopy <src> <dst> /E /XX /NP

What command would be the right one for me?

Anvesh Yalamarthy
  • 1,625
  • 20
  • 36
meilon
  • 693
  • 1
  • 6
  • 20
  • Instead of editing your question, could you setup an answer with the solution and mark it as such ? Thanks for all searchers. – Mat M Sep 26 '12 at 23:31
  • @MatM I found the solution too early for Stockoverflow to post an answer myself (it wouldn't let me). And I kinda forgot to do it later - but I did it just now! – meilon Sep 27 '12 at 09:54

1 Answers1

17

Okay, the German translation is a little bit bad. The original English help from robocopy tells me exactly what to use:

/XL : eXclude "Lonely" files and dirs (present in source but not destination)
      This will prevent any new files being added to the destination.

(In the German translation the very helpful part "present in source but not destination" is left out)

meilon
  • 693
  • 1
  • 6
  • 20