Lost Code From Computer Crash

Share your advanced PureBasic knowledge/code with the community.
Randy Walker
Addict
Addict
Posts: 1064
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Lost Code From Computer Crash

Post by Randy Walker »

"I was working on new test code in an IDE pane and did not save it to a file before the computer crashed".
We all know of course the best way to avoid this and similar problems altogether is to give your new work a name and immediately save it to a file. Then for every change that is a contribution to your work "save" again! Nonetheless, it happens... we get lazy when we start out thinking its just a little test, but soon turns into something more... something you might not want to lose.

Don't Panic!

This trick only works if you have executed your test code before your computer lost power and crashed. Just open a 'My Computer' window, type %temp% into the 'Address' bar and press Enter. There inside your temp directory is a copy of your work created the last time you executed your test code. Just look for 'PB_EditorOutput.pb' (or maybe similar name with the .pb extension) and copy that file to your main works folder. Open that file with a plain text editor (like notepad) and edit out any text appended by the compiler. Save it, rename the file if you want and load it back into your PB editor. Now you're right back where you were before the power glitch.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Lost Code From Computer Crash

Post by PB »

Don't forget that some people have enabled the setting to save the
"PB_EditorOutput.pb" file to the same folder as the source, rather
than to %temp%.

Also, the session history of the IDE will hold a backup of changes.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply