Tuesday, October 27, 2009

Shell Command - Delete Visual SourceSafe Files

Visual SourceSafe has a tendency to litter version-controlled directories with 3 types of project tracking files (*.scc, *.vssscc, *.vspscc) that may be undesirable when sharing a project with others. This simple "Delete SourceSafe Files" Shell command will quickly delete all instances of those files in a directory and its sub-directories. To use, run this registry script:
Windows Registry Editor Version 5.00

@="Delete SourceSafe Files"

@="cmd.exe /c \"TITLE Removing SourceSafe Files in %1 && COLOR 9A && del *.vssscc /s /f && del *.vspscc /s /f && del *.scc /s /f\""
I got this idea from Jon Galloway's blog post on creating a shell entry to remove SubVersion files. (Yes, the code is almost identical.) Note: This will *not* remove source-control bindings from the SLN file. That must be done manually by opening Visual Studio. If this script is run on a source-controlled solution and the solution is run VS will produce an error message regarding missing source-control files. Confirming the default action will permanently remove the binding from the SLN file. For the lazy: Download Zipped Registry File. (My host refused to serve a .reg file, sorry!)

No comments: