Wednesday 30 July 2008

VSS get from label using a BAT file

It is recommended that you if you want to retrieve files from a label in VSS you always get it from command line using the SS GET command. When done in this way it will always get the correct version in case there was a label move operation on a particular file.

For example:

echo off
cls
c:
cd "C:\Program Files\VSS\win32\"
set SSUSER=username
set SSDIR=\\blah\Data\Applications\SourceSafe\Development\
ss Get $/Blah/Development/Code/dh/*.* -R -VL"LabelName" -GF -I-Y
if %errorlevel% equ 100 goto error
if %errorlevel% equ 0 goto end
:error
echo %errorlevel% Source Safe Error
:end
echo Finished
pause

Version not found? Read here: http://support.microsoft.com/kb/197050

No comments: