A reader emailed me this request for more infomation yesterday, “We keep several types of web projects in VSS, some apps from VStudio, some from dreamweaver, etc. As it stands now, both the shadow folder and deploy contain *all* the files. I'd like to be able to specify which files are (or are not) deployed.”
The current SourceSafe documentation does not address this common scenario very well. Argh. I'll correct this as soon as I finish writing this blog post. The fix should be available in the next release of Visual SourceSafe. If you're a seasoned VSS user who works with SS commands routinely and you have the attention span of a crack addict, here's the one line answer: SS GET $/projectname *.ext1 *.ext2 file?.* -GLc:\deploypath -Yusername (Italics == variables). For those of you who haven't been locked in a room with VSS and a box of donuts since 1996 and want to understand why and how this works (or even, what the heck it is), here's the full story.
You can “deploy“ the files in a VSS project to a physical location on your computer or another one on your network in three ways:
As the reader who emailed this question points out, options 1 and 2 don't support per-file deployment. You can shadow a VSS project folder but you can't shadow an individual file. You can Deploy the files in a VSS project folder to a path on disk but you can't use wildcards to specify exactly which files you want.
Option 3, SS Get, is the silver bullet. You can use the SS Get command to retrieve an individual file to disk, recursively retrieve the contents of a VSS project or database to disk, or you can retrieve files with a certain extension or name pattern using wil*cards. The following procedure assumes that you have not configured your machine for turnkey execution of SourceSafe command-line commands.
Result: Only files with the specified extensions and pattern-matching file names are "deployed" (aka, gotten) to the deploypath from your project.