This documentation is archived and is not being maintained.

About Visual SourceSafe Commands

Visual Studio 2005

The Visual SourceSafe command line utility SS (Ss.exe) runs command line commands from the MS-DOS command prompt. See SS Utility for details of the command line utility.

You can use the command line by changing your current folder to the directory in which Ss.exe resides. Alternatively, you can use it from any directory by typing a complete path to the Ss.exe file along with the command. See How to: Perform a Simple Visual SourceSafe Command for a basic procedure.

A Visual SourceSafe command line entry consists of: "ss" representing the SS utility), the command name (for example, Checkout), files or projects (items) for the command to act on, and command options. When performing a command, the SS utility examines the options you provide for the command, along with current settings for initialization variables and environment variables. The syntax for command line entry is:

ss <command> <items> [options]

Specifies one of the Visual SourceSafe command line commands. For a complete list and technical description of all Visual SourceSafe commands, see Command Line Commands.


Specifies items on which the command operates. An item varies depending on the particular command. For example, for the Get command, an item is a file or project from the Visual SourceSafe database. However, for the Add command, an item is a file or folder on your computer. Most commands allow you to specify more than one item.


Specifies options to modify the action of a command.


You do not have to type an entire command name for the Visual SourceSafe command line to recognize it. You only need to enter enough of the name for it to be distinguishable from all other commands. Usually, typing the first two or three characters is sufficient.

You can append one or more options to most Visual SourceSafe commands. Available command options are defined in Command Options.

An option is preceded by a hyphen (-), for example, -R. In the following example, the –R option instructs the SS utility to run the Checkout command to check out all files in the code project. The "$/" indicates the root of the default Visual SourceSafe database.

ss Checkout $/code -R

The command line displays output from most commands in traditional character cell format. Certain commands, however, such as the View command, display output in windows. When the action of a command is complete, Visual SourceSafe returns you to the command prompt.

Each time you enter a command from the command line, Visual SourceSafe prompts you for your user name and your password. You can avoid this step as described in How to: Avoid Prompts on the Command Line.

The command line is not case-sensitive regarding command entry. For example, the entry "ss Get HELLO.C" is completely equivalent to "ss get Hello.c". However, some commands, such as the FindinFiles command, do apply case-sensitivity to the text string that you supply. The following example looks for the string "post":

ss FindinFiles post alias.txt

Note that this entry on the command line will not find any occurrences of "Post", since you have specified "post". See FindinFiles (Command Line).


To allow a command to ignore case in a text string, you can use the -IC option, if it is supported by the command. See -I Option (Command Line).

When an item or option entered for a command contains the space character as part of a text string, use double quotation marks around the entire parameter. For example, use "-CThis is the comment" and not -C"This is the comment". Otherwise, the space is treated as a separator between different parameters, and the command either fails or gives unexpected results.

Visual SourceSafe supports a Help command that you can use to get Help on any command line command. See How to: Get Help for Visual SourceSafe Commands.

When you run the SS utility, it sets the exit code to indicate its running status. You can use this operating system variable in batch files, scripts, and macros to react based on what happened during execution of a command. The following table defines the possible settings for the exit code.


Indicates that something went wrong. For example, Visual SourceSafe could not find its data files, or a file you want to check out is already checked out.


Indicates that a mild failure is likely for the next command, even though the present command ran successfully. This exit code might occur in one of the following circumstances:

  • When the Dir command finds no items.

  • When the Status command is run and at least one item is checked out.

  • When the Diff command finds at least one file to contain differences.


Visual SourceSafe executed successfully.