Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Help! Recover .cpp and .h files

:eek:

Can anyone quickly tell me if visual studio 2003 keeps a backup of previous versions of a project (without manually doing it),, source files such as .cpp and .h files?

The problem I have encountered..
Upon attempting to uncheck out my work in visual source safe, visual source safe wrote the files on the server out to my local drive (destroying the work that I have done on my local drive). I am trying to recover and revert back to the data on those files before source safe changed them.

Does visual studio 2003 do this and can I recover my files? Thanks
[603 byte] By [jayvatar1] at [2007-11-11 8:00:10]
# 1 Re: Help! Recover .cpp and .h files
It does not, to my knowledge. You probably have all sort of fancy stuff, but I just zip my folder(s) at important times and have a batch file in the task scheduler zip all changed files again each night at off hours.

However, the checkin and checkout process of most source management tools does keep the changes tracked. You should be able to get at the logged version or the changes somehow. I havent used vss, but the unix style ones keep such logs.
jonnin at 2007-11-11 21:01:38 >
# 2 Re: Help! Recover .cpp and .h files
Yeah, thanks for the input. I think I am just stuck with what I got. Essentially what happened is that old checked in files inside source safe got copied over my local files on my harddrive. There is a feature that allows you to check out a file, I had a few files that were checked out...I decided to uncheck these files (I did not want to have them checked out)... at this point source safe writes the server files over my local files. Source safe (to my knowledge) only tracks changes to files that are locked into the server, it will not track changes to files that it pushes on to local machines. I could of toggled whether or not I could have my local files replaced but I did not see the popup. And futher more if I wanted to replace my local files with the server's version wouldnt I just do a file get and replace. Unchecking a file should not have the capabillities of projecting images of files over your local files. I consider this bad software. I had months of work go poof.. oh well.. rebuild.
jayvatar1 at 2007-11-11 21:02:39 >
# 3 Re: Help! Recover .cpp and .h files
I lost you somehwer down the line with your explanation of the sitaution but the general idea is this: source safe keeps track of changes to files between each checkin/checkout sequence. So if you made sure that yoru files were regularly checked out and in, then yoiu can recover the "nsaphsots", i.e., the different versions of these files/ VS per se certainly doesn't keep older versions of source files once you have changed them and saved them. I wish Windows had what VMS used to have: file versions. A file on VMS would look like this
main.cpp;1
main.cpp;2
etc., where newer versions have a higher number. There is a rollover after 128 or so but you can still find very old versions of the same sources in the same directory. This is of course a source for bloat but it did save me several times back in my VMS days. Todays, I make sure to backup my files at least once a day on a disk-on-key.
Danny at 2007-11-11 21:03:49 >
# 4 Re: Help! Recover .cpp and .h files
Hi,

Firstly I suppose you trying some powerful data recovery tools that might help unit the data is overwritten more and more. The one I've used and that worked great is Undelete, it can really bring back erased or lost files. If you wish, you can try that out too.
http://www.active-undelete.com/
triangle at 2007-11-11 21:04:48 >
# 5 Re: Help! Recover .cpp and .h files
Notice that the date of this was last febuary, over 2 months back. Somehow you have found old threads to reply to.
jonnin at 2007-11-11 21:05:43 >