Howto restore DFS-R Conflict data
A simple vbscript to allow recovery of DFS Replicated files that have been pushed into the ConflictAndDeleted or PreExisting folders due to misadventure.
Remember, this script must be run from a CMD prompt using cscript.exe. Don't just double-click the script.
DO NOT JUST COPY THE TEXT ON THIS SCREEN - DOWNLOAD THE SCRIPT FROM THE DOWNLOADS PAGE. OTHERWISE YOU WILL RECEIVE ERROR:
"VBSCript error: Object required: 'objXMLDoc'
Sample snippet...
CSCRIPT.EXE RESTOREDFSR.VBS
The script also requires to edit three paths (your source files, a new destination path, and the XML manifest you are calling). If you fail to edit those the script will exit with an error:
'======================================================================= ' Section must be operator-edited to provide valid paths '======================================================================= ' Change path to specify location of XML Manifest ' Example 1: "C:\Data\DfsrPrivate\ConflictAndDeletedManifest.xml" ' Example 2: "C:\Data\DfsrPrivate\preexistingManifest.xml" objXMLDoc.load("C:\your_replicated_folder\DfsrPrivate\ConflictAndDeletedManifest.xml") ' Change path to specify location of source files ' Example 1: "C:\data\DfsrPrivate\ConflictAndDeleted" ' Example 2: "C:\data\DfsrPrivate\preexisting" SourceFolder = ("C:\your_replicated_folder\DfsrPrivate\ConflictAndDeleted") ' Change path to specify output folder OutputFolder = ("c:\your_dfsr_repair_tree") '========================================================================
This script is an unsupported, as-is, no-warranty, last gasp, solution. If you are using it, you don’t have any backups, you are not using Previous Versions, and you are praying that you have not hit the conflictanddeleted quota (which is only 660MB by default).
This new version now properly detects all file and folder types, runs a bit faster, and no longer requires weird trailing backslashes. It does not support command-line arguments as the very idea bores me to tears.
Make sure you destroy all previous versions of this script you have lying around.
Link and script here: RestoreDFSR (recover conflicted or pre-existing files)