A shadow copy is a way to access used or locked files in Windows.

Usage Edit

  • Install the Volume Shadow Copy Service SDK for Windows XP and 2003.
  • Set a variable for where your vshadow.exe is located
    • For 32-bit: set vshadow=C:\Program Files\Microsoft\VSSSDK72\TestApps\vshadow\bin\release-server\vshadow.exe
    • For 64-bit: set vshadow=C:\Program Files (x86)\Microsoft\VSSSDK72\TestApps\vshadow\bin\release-server\vshadow.exe
  • Create a shadow copy, e.g. of your C-drive and use V as the temporary drive for the shadow copy
if exist V: echo Y | %vshadow% -da
%vshadow% -p -nw -script=vars.bat C:
call vars.bat
%vshadow% -el=%SHADOW_ID_1%,%shadowdrive%:

rem Copy to a backup location
xcopy /h /i /e /y "V:\folder\to\backup" "D:\destination\of\backup"

rem Unshadow folder
%vshadow% -ds=%SHADOW_ID_1%

See also Edit