Jun 13, 2012 at 12:09 AM
Edited Jun 13, 2012 at 12:11 AM
Note: I am using VSS 6.0d, perhaps VSS 2005 is different.
How do you find out when a file was deleted?
Calling get_Versions() returns a list of all versions of a file. Each version has a string property called Action. A separate version is returned for each event that has occurred for that file, such as created, labeled, checked in etc, but not deleted.
This webpage http://msdn.microsoft.com/en-us/library/bb509341%28v=vs.80%29.aspx lists the following possible values for the Action property:
Branch at version <version number>
Checked in <SourceSafe file path>
Moved <old SourceSafe path> to <new SourceSafe path>
Renamed <old name> to <new name>
Shared <SourceSafe file path>
I am yet to see the Action property contain the string Deleted, and I don't see how it is possible to ever contain Destroyed.
The IVSSItem property Deleted is not much use, as it is just a Boolean that indicates that the file or project has been deleted, but not when. Displaying a files history using the VSS GUI does display the correct deletion date, so the information is in the