Source Gear Vault would create a hidden directory, _sgbak, in the directories it versions. Unlike _svn directories or _cvs directories which also uses it for configuration purpose, _sgbak is mostly serving what the name says (backup). For example, if you are in the event of reverting your file back to an earlier version but having no connection to the server, you can simply dig out the file from _sgbak, and manually revert it yourself.

That said, over time the _sgbak directory grows, making it difficult to copy from one environment to another. Unlike TortoiseSVN which supplies a tool to export the directory right from shell, in many cases I end up doing it by hand. But now, there is a quicker way, just create a batch file (.bat or .cmd with the following content, the code will recursively remove all the _sgbak directories from the place where you run the batch file.


@ECHO OFF
FOR /R %%f IN (_sgbak) DO IF EXIST "%%f" (
ATTRIB -h "%%f"
rd /s /q "%%f"
)

Advertisements