문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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 ...)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top