This is a DOS command file to remove the Visual Source Safe files from a solution if you have the debatable honour of using it but wish to retrieve a clean copy of your solution. You will also need to open the solution file itself in a text editor and manually delete the “GlobalSection(SourceCodeControl)” section.
Note that you should ensure your code is fully backed up before trying this. The file may need changes to support other project types.
@ECHO OFF
ECHO Filter out the Scc data in each project file to a new .novss file
FOR /R %%f IN (*.csproj *.vdproj *.dbp) DO FIND /V "Scc" < %%f > %%f.novss
ECHO Delete project files
DEL /S /Q /F *.csproj
DEL /S /Q /F *.vdproj
DEL /S /Q /F *.dbp
ECHO Rename .novss project files to remove extension
FOR /R %%f IN (*.novss) DO REN %%f %%~nf
ECHO Make project files read-only again
ATTRIB +R *.csproj /S
ECHO Delete directory source control files
DEL /S /Q /F *.scc
ECHO Delete project source control files
DEL /S /Q /F *.vspscc
ECHO Delete solution source control files
DEL /S /Q /F *.vssscc
ECHO Now delete "GlobalSection(SourceCodeControl)" from solution file(s)
Using: Visual Studio 2005; Visual Source Safe 6.0;