Reputation: 43
I'm attempting to write a batch file that will get the latest version automatically of only certain folders from SourceSafe.
FILE LOCATIONS:
SourceSafe is installed on my C drive:
C:\Program Files (x86)\Microsoft Visual SourceSafe
The users.txt and data folder which contains um.dat are located in a Share on the Network:
//Server (I have mapped this folder to drive X: for convenience)
.BAT FILE:
@echo off
REM SET ENVIRONMENT VARIABLE TO LOCATION OF SS.EXE
PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual SourceSafe
REM SET DIR TO THE DATA DIRECTORY I.E. LOCATION OF SRCSAFE.INI
SET SSDIR = X:
REM LOGIN DETAILS
SET SSUSER = Administrator
SET SSPWD = Password
REM SET THE CURRENT PROJECT
ss CP $/Development/Websites/MySite
REM GET LATEST FROM THESE FOLDERS (RECURSIVE)
ss Get $/App_Code -I -Y -R -W
ss Get $/App_Data -I -Y -R -W
ss Get $/Bin -I -Y -R -W
ss Get $/Images -I -Y -R -W
ss Get $/scripts -I -Y -R -W
ss Get $/styles -I -Y -R -W
pause
PROBLEM:
When I run the file I get the following error:
Invalid DOS path: C:\Program Files (x86)\Microsoft Visual SourceSafe\data\um.dat
It seems to be looking for these files in my C drive when it should be looking in the X drive. I've tried moving the problem files (um.dat and users.txt) from the X drive into that location on the C drive. The batch file will then run but I don't get the latest version.
If someone could help me figure this out I'd be very grateful!
Upvotes: 0
Views: 4098
Reputation: 1
You can try
ss Get $/Development/Websites/MySite/App_Code -I -Y -R -W
instead of
ss Get $/App_Code -I -Y -R -W
Upvotes: 0
Reputation: 7074
Most likely your problem is that you are putting spaces around the =
when you're doing a set
. You are creating an environment variable SSDIR =
, which isn't the same as SSDIR=
.
You can see this by doing the following in a CMD window:
C:\> set HELLO = this
C:\> set HELLO=that
C:\> set HELLO
HELLO=that
HELLO = this
Both exist, as the name of the environment variable is everything up to the equals, including the whitespace before the equals.
Sourcesafe will be looking for an environment variable called SSDIR
, and that's not what you're setting.
Try changing the appropriate lines as follows:
REM SET DIR TO THE DATA DIRECTORY I.E. LOCATION OF SRCSAFE.INI
SET SSDIR=X:
REM LOGIN DETAILS
SET SSUSER=Administrator
SET SSPWD=Password
Upvotes: 0