I promised I would return to the Force_Dir initialization variable (aka 'Assume Working Folder Based on Current
Project') and now, at last, I can. Unless you have a ton of existing VSS
scripts, I encourage you to change the inexplicable default value for this variable. Here's
One of the
least noticeable and most confusing differences between the VSS
command line environment and SourceSafe Explorer is the default way in which
their underlying programs (ss.exe and ssexp.exe, respectively) copy the database
version of a file from the database to a local folder during Get operations.
When you use SourceSafe Explorer to checkout a file, your local copy is
retrieved to the project’s working folder, by default.
When working from the command line however, the default is quite the
opposite: a checked out file is instead retrieved to the current folder
, which is the working folder
for the current project.
Normally, the path to a file’s working folder differs from the path to the
current project. Confusing, huh? That's why you should change the
unable to determine why the command line defaults to retrieving
files to the current project. The VSS product team is understandably reticent to
change the default setting since doing so could break many
customers' existing scripts.
If you're just getting started,
you override the command line’s default behavior using one
of the following methods.
To change the default local path selection
logic for GET operations (ss get, ss checkout, etc) when using VSS commands
in a batch file or from the command line:
Alternatively, you can set the Force_Dir
initialization variable, my favorite initialization variable, to
yes in either SS.INI or SRCSAFE.INI
Finally, if you don't want to or cannot change this option for your
database or a particular user, you can override the default behavior for any VSS
command involving a Get operation (Get, Checkout, Share, Deploy, Undo
Checkout...) by appending the -GL parameter to the
Until next time, take care of your favorite database. Run