Skip to content

Instantly share code, notes, and snippets.

@moisseev
Created November 7, 2016 15:05
Show Gist options
  • Save moisseev/044627f88b17e165cf5997acc12d0658 to your computer and use it in GitHub Desktop.
Save moisseev/044627f88b17e165cf5997acc12d0658 to your computer and use it in GitHub Desktop.
On-the-fly Windows directory mirroring using VSS snapshot with ShadowSpawn and robocopy
@echo off
rem On-the-fly Windows directory mirroring using VSS snapshot
rem with ShadowSpawn (https://github.com/candera/shadowspawn) and robocopy
rem This script mirrors SRC directory contents into DST directory
set SHADOWSPAWN="C:\Program Files\ShadowSpawn\ShadowSpawn.exe"
rem Mount snapshot as:
set DRIVE=S:
set SRC="C:\path\src_dir"
set DST="C:\path\dest_dir"
%SHADOWSPAWN% %SRC% %DRIVE% robocopy %DRIVE%\ %DST% /mir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment