Pergunta

Is there such a command or the like in copy, xcopy, or robocopy that will copy the entire contents of a source directory that

  1. overwrites existing target subdirectories and files,

  2. adds target subdirectories and files that did not already exist, AND (the big 'un),

  3. deletes target subdirectories and files that do not exist in the source directory?

Foi útil?

Solução

Robocopy with the /mir switch will give you a mirror backup.

A benefit is that it does not copy files which have the same size and timestamp to save time and needless copying.

Outras dicas

You could also have to look to unison. It is not under active developpement but I've used it without any problem to sync directories between XP and Linux directories. Its main advantage is that is able to sync directories even when modifications can happen to both sides. Under Windows, it can be used through command line or with a IHM (but you must read the manual ...)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top