said by bcastner
:Using the FilesNotToSnapshot Registry Key to Exclude Files from Shadow CopyFiles can be deleted from a shadow copy during shadow copy creation by using the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\BackupRestore\FilesNotToSnapshotThis registry key has REG_MULTI_SZ (multi string) values for each application whose files can be excluded. The files are specified by fully qualified paths, which can contain the * wildcard. If a fully qualified cannot be specified, then a path can also be implied by using the $UserProfile$ or $AllVolumes$ variable. For example:
$UserProfile$\Directory\Subdirectory\FileName.*
$AllVolumes$\TemporaryFiles\*.*
To make the path recursive, append /s to the end. For example:
$UserProfile$\Directory\Subdirectory\FileName.* /s
$AllVolumes$\TemporaryFiles\*.* /s
Using the FilesNotToSnapshot Registry Key to Exclude Folders from Shadow CopyVSS exclusions work differently than exclusions for Restore Points in XP, for example. VSS exclusions are actually deletion directives; a "Best Effort" is made to honor the exclusion, but it is not gauranteed to perform the exclusion at each VSS session. My experience has been that it has always happened, but I note the reservation for the record.
To "exclude" a Folder, you exclude its contents. VSS works at the file level for fully qualified paths, but cannot operate at the Path or Folder level. The folder structure will be preserved but empty. Example:
C:\I_NO_WANT\*.*
To make the path recursive, append /s to the end. This asks that all files, and all files in all subFolders, are excluded from VSS beginning at the parent folder C:\....\Subdirectory\ For example:
C:\I_NO_WANT\Subdirectory\*.* /s
########################################################