purge switch

About this tag
The purge switch in Robocopy is used to delete files and directories from the destination that no longer exist in the source, enabling true mirroring between folders or drives. In a WindowsForum thread about mirror copying between USB drives, a user sought a way to automatically remove files from the destination when they are deleted from the source. The purge switch (/PURGE) accomplishes this by removing destination files and folders that are not present in the source, while the /MIR switch combines mirroring with purging. This is useful for maintaining identical copies without manual cleanup, though caution is needed to avoid accidental data loss.
  1. Windows 11 Mirror copying files between USB drives

    Hi. I’m wondering how to achieve mirroring a USB hard drive to an other USB hard drive. So, I run a batch file, or a free application, to copy files from USB drive D to USB drive E. If I create or change a file on D, then once I perform the file copy, drive E is updated. However, I also want...