Skip to content

Instantly share code, notes, and snippets.

@dpritchett
Created March 1, 2011 21:52
Show Gist options
  • Save dpritchett/849961 to your computer and use it in GitHub Desktop.
Save dpritchett/849961 to your computer and use it in GitHub Desktop.
Clone a folder from one windows server to another using xcopy (plus rmdir and service restarts)
@echo ******** STOPPING BOARD SERVICES ********
@rem sc \\productionservername stop board7
@rem sc stop board7
@echo ******** CLONING PLANNING DATABASE FROM PROD TO DEV ********
C:
CD \Board\Database
rmdir /s /q ".\database_name.dtbx"
dir
@pause
xcopy \\productionservername\c$\board\database\database_name.dtbx c:\board\database\database_name.dtbx\ /E /Y /X /K /D
dir
@echo ******** STARTING BOARD SERVICES ********
@rem sc \\productionservername start board7
@rem sc start board7
@pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment