Goodbye CVS!

Ever had to manually go through a large project and delete all the CVS folders in it because you didn't export it and the module no longer exists in CVS? If all you have is a workspace copy and you want to add it back to CVS (perhaps a different CVS server), then you can either painstakingly delete the CVS folders manually or you can buy me a beer as thanks for this little nugget:

FOR /r /d %D in (CVS*) do @rmdir /q /s "%D"

In Windows, go to the root directory of your project, enter the line above into the command prompt and all your CVS directories will be gone :) (Disclaimer: Be careful with wildcard deletes like this -- double check that you've entered it correctly, that you're in the right directory and that you have no other directories that begin with "CVS". Don't come banging at my door if you accidentally wipe out your hard-drive!)

Of course, the best thing is never to get into these situations. You can easily use a tool like Tortoise CVS (or the command line) to Export a copy of your project without the CVS directories.