02 / JAN, 2008 NOTE: NEW VERSION OF THIS SCRIPT AVAILABLE
' NAME: RestoreConflicted.VBS
' AUTHOR: James Carr, EPS, Microsoft Corporation
' AUTHOR: Ned Pyle, EPS, Microsoft Corporation
' COMMENT: Disaster Recovery script for pulling DFSR data out of ConflictAndDeleted
' and putting it back into a usable directory tree, preserving paths
' names, and security descriptor info.
' USAGE: Replace the 3 variables in the "operator edited" section below
' with valid paths. The Script will copy the contents of the CandDFolder
' to a specified path, returning files to original names and adding back
' their folder structure at the time of deletion.
' It is important to note that duplicate conflicts will not copy - check
' the restoreconflicted.log to see which files need manual intervention
' (this is done to prevent the accidental restore of an older conflicted copy)
' Finally: this tool can only copy files that were preserved in ConflictAndDeleted
' by quota (by default, 660MB). If the quota prevented all files from being saved
' this script is not going to help for those that were trimmed out.
' VERSION HISTORY:
' 1.01 / 09/25/06 -
' Added support for whitespace in shelled XCOPY commands (thanks to sabinn, kapilme for catching)
' 1.00 / 08/25/06 -
' First working version
' This script is provided "AS IS" with no warranties, and confers no rights.
' For more information please visit
Const quote = """"
' Startup XML
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
' Set File Move Environment
Set objShell = WScript.CreateObject("WScript.Shell")
' Section must be operator-edited to provide valid paths
' Change path to specify location of C&D Manifest
' Change path to specify location of conflicted files
CandDFolder = ("C:replicatedfolderDfsrPrivateConflictAndDeleted")
' Change path to specify output folder
OutputFolder = ("c:dfsr_repair_tree")