I needed a way to back up SourceSafe 2005 automatically.

I found this link http://getacoder.cn.googlepages.com/Backup-SourceSafe.html but made some modifications to the code to get it to work. I was getting an Invalid DOS path error when trying to run the .bat file. Windows didn’t like how the date portion of the file was being created.

@echo off
@title Backing up SourceSafe databases
 
set
SsPath=C:Program FilesMicrosoft Visual SourceSafe
set
BakPath=D:backupssourcecode

"%SsPath%ssarc.exe" -d- -s"D:Source Code" -i- -yadmin,password -o@"%BakPath%Backup-output(%date:/=-%).txt" "%BakPath%Backup-Database(%date:/=-%).ssa" $/

echo
Finished backups
@echo on

Also putting "pause" at the end of this file will help you view the command window before it closes.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This Post Has 0 Comments

  1. Shane Bauer

    I cringe at the thought of using SourceSafe.
    SVN, TFS, Git, Merc. Something. Anything but VSS.

  2. Mark Perry

    A product that we are using now that complements VSS very well is SourceAnywhere for VSS. It makes VSS very usable now.

  3. Shane Bauer

    Yeah, I’ve heard of it.
    Don’t you find it sad, though, that you need to use a third party tool (patch, blanket, whatever you want to call it) to use VSS effectively?
    One of the biggest issues I find is that developers that use SourceSafe (not saying you, or your team. Just a general observation), have no idea how to use proper version control. Branches, tags, nothing.
    I’ve been to several companies in the Baltimore region and you know the first thing that I did? Ripped out VSS, trained devs in Subversion, setup a build server, and answered questions. The hardest part is just getting people to understand that lock-edit-checkin is a horrible implementation.