Adds new files into the VSS database.
ss Add local files [-B] [-C] [-D-] [-H] [-I-] [-K] [-N] [-O] [-R] [-W] [-Y] [-?]
Adds file HELLO.C to the current project:
ss Add C:\HELLO.C
Adds files TEST.C and MY LONG FILENAME.H to the current project:
ss Add TEST.C "My long filename.H"
Adds all files in current folder to the current project:
ss Add *
Adds all files in current folder and all subfolders to the current project:
ss Add -R *
The following table describes the command-line options available with this command.
Option | Description |
-C | Use the same comment for all added files. |
-D- | Do not track old versions of this file. |
-R | Recursively add an entire folder tree, creating a project list in VSS. |
-K | Check out the file immediately after adding it. |
-B | Assume the file is binary. Use -B- to assume the file is text. |
-W | Leave the local copy of the file writable. |
-O | Paginate or redirect the command output. |
-I- | Ignore: Do not ask for input under any circumstances. |
-N | Change between long and short file name mode. |
-Y | Specify a username and/or password. |
-?, -H | Request online Help on a command. |
You must have the Add access right to use this command.
You can specify a file on any drive and folder, and add that file to the current VSS project. To add a folder recursively, that is, to add all of its subfolders and files, specify a folder instead of a file name and use the -R option.
Note This command supports Universal Naming Convention (UNC) names: it's not necessary to specify a drive. You can type, for example, \\COMPUTER\SHARE\FILE.TXT to add the FILE.TXT file from \\COMPUTER\SHARE.
When you specify *.* as the item to add, or use the -R option, the Add command first checks the Relevant Masks variable in the VSS initialization files.
The -D- option indicates that you don't want to store anything but the latest version of the file in the VSS database. When you add a file with this option, VSS keeps a file history of change records with comments. However, the change record that tracks the actual changes to your file is not stored; consequently, VSS can retrieve the latest version, but no earlier versions of this file. This option is frequently used with binary files to increase speed and save disk space.
The -B option indicates that all the files you are adding are binary files in cases where you don't want to use the VSS AutoDetect feature; -B- specifies text files. Both override the VSS default AutoDetect mode.