Saturday 15 March 2014

Archieve/Backup Visual SourceSafe file using CMD


@ECHO OFF
@TITLE Backing up source safe databases
FOR /F "tokens=2-4 delims=/ " %%i IN ('date /t') DO SET DATE=%%k%%j%%i
FOR /F "TOKENS=1-2 DELIMS=: " %%I IN ('time /t') DO SET TIME=%%I%%J
FOR /F "TOKENS=2 DELIMS= " %%K IN ('time /t') DO SET AMPM=%%K
"C:\Program Files\Microsoft Visual SourceSafe\ssarc" -d- "E:\Today.ssa" $/ "-sE:\Vss-Projects" -yadmin,pass@word1
@ECHO Finished backups


Here,
  
C:\Program Files\Microsoft Visual SourceSafe\ssarc is SourceSafe Archieve application (ssarc.exe) path
E:\Today.ssa - Backup File Location and Name
E:\Vss-Projects - Current Srcsafe stored Location.
admin and pass@word1 is credential for the VSS admin who has permission to backup and restore. 

No comments:

Post a Comment