programming editor, forgot to save file... HELP

ac246

New Member
hi guys,
ive spent the WHOLE day writing this piece of code, i was totally absorbed in it that i forgot to save it. i know i should of and i normally do, just this time i didnt.

anyway what happened is i put the laptop on the sofa while i went to make a coffee,, and the dog jumped up, knocked the laptop off the sofa. the laptop turned completely off.

i turned laptop back on and have lost everything i was doing. the file was previously saved last time i used it in january. i know you can not read the program back from the chip, which is really annoying because the chip has the most up to date program stored on it. but does the programming editor store a temporary file anywhere on the computer while it is running where my program might still be??

im utterly devostated, obviously not the dogs fault, its my fault for not saving it. i couldnt find anything similar on the forum so created a new post.

thankyou in advance and any help would be appreciated.


PS. PLEASE PLEASE PLEASE BRING OUT AN AUTOSAVE IN THE NEXT VERSION!!!! LOL
 

Jamster

Senior Member
Hello and welcome to the forum.

Short answer: unless they havn't put it in the manual, no
Sorry

Look on the bright side, you will now have learnt a hell of a lot and will have hopfully ironed out most of the problems.
 

premelec

Senior Member
Ransack

I use XP and when I've lost a file I use a program "Agent Ransack" which is much more efficient than XP's search. So assuming you were working in C drive at all - and you know some unique text that was in your code search C:for a file named *.* containing 'unique text string' and see if anything comes up. Good luck - we've all done it - even without a dog!
 

ac246

New Member
thanks guys.. ill download that program and give it a go. and learnt that next time ill shout the mother to make my coffee instead :p haha oh and save it lol
 

Dippy

Moderator
I'm surprised an automatic save of some description hasn't been included. Similar situations and mentions for autosave have cropped up in the past.

Other IDEs and CADs have had autosaves for donkey's . Some IDEs do a save every time you do a build (aka compile and download).

Maybe an extra sentence in the Manual saying "Make sure muttley stays outside" would be good.:)

Maybe the sound of a dog barking will make you save your data now - Pavlov discovered a similar thing coincidentally also with dogs. ;)
 

Technical

Technical Support
Staff member
If you did a syntax check/download try a search in your Windows temporary folder for a file called ecode.bas
 

ac246

New Member
THANKYOU TECHNICAL. I LOVE YOU. exactly where you said it would be, you have saved my life.. and thankyou to premelec, the program you suggested helped me find it.

so does the editor always put the last downloaded copy into ecode.bas?

thankyou guys

Aaron
 

westaust55

Moderator
Syntax Check ==> a temp file ecode.bas

Post #6 should
REALLY
go on a sticky. :)

It may help many in the future.

e
I fully concur.

While it may not help all, with the number of times the questions gets asked after folks forget to save, it is good information to know. If it only helps a few it is worth knowing.

Obviously will not help those who loaded their program and then did something else and come back days or months later to find they do not have a copy of the .bas file but for those who realise immediately there is that chance.
 
Last edited:

Haku

Senior Member
Given the relatively miniscule size of Picaxe basic code to the sheer obscene size of harddrives nowadays, an autosave feature that can store programs being edited in a large file on a regular basis would be very very very welcome, perhaps with the ability to sift through previous code & revisions (each with a timestamp) in the event of a crash or whatnot.
 

Hydroid

Senior Member
Interesting. No files of that name on my PE system. Do they expire/get deleted?
Me too.

As a test, I ran PE and input a small piece of code, ran syntax check and then immediately looked for ecode.bas - nothing. Shutdown PE and looked again - still nothing. Searched my entire system for ecode.bas - nothing...

Running Windows 7 64 bit. Maybe it's OS specific ?

John.
 

marks

Senior Member
i'm running windows7 64 bit works fine for me !

1. click on start menu
2. enter (ecode.bas) in search program and files hit return
3. new window will open search again in . click on computer
finds it within a few seconds.
 
Last edited:

geoff07

Senior Member
Just did a thorough search and found a file under C:\Documents and Settings\Administrator\Local Settings\Temp\ on both my xp laptop and also my xp under virtualbox under ubuntu system

So maybe it has some flexibility over where it gets put.
 

hippy

Ex-Staff (retired)
The file will be placed in whatever Windows has as the System Temporary directory at the time. That can vary between OS's and depends on OS configuration. Some versions of Windows may hide this directory depending on what's used to access files.
 

inglewoodpete

Senior Member
If you did a syntax check/download try a search in your Windows temporary folder for a file called ecode.bas
Can Technical be more specific?

I have:
C:\Temp\
C:\Documents and Settings\inglewoodpete\Local Settings\Temp\
and
C:\WINDOWS\Temp\

I also searched the C: drive but no sign of ecode.bas (Windows XP Home SP3)

Edit: .... and not files hidden, either.
 
Last edited:

Technical

Technical Support
Staff member
When a syntax check/download is carried out the temporary file 'ecode.bas' is saved with the current on-screen data (ie the exact code that needs to be checked, which is often different to the last saved version). It is just saved into the folder that Windows 'tells' the PE to use (ie the Windows temporary folder as setup on that machine, which varies with different systems and different configurations).

Yes, we do agree that autosave will be added in the future, in fact it is kind of obvious now people have actually made the request!
 

geoff07

Senior Member
Thats good. I suggest you code it to save every version that is downloaded, in an 'archive' folder, with a timestamp in the name for simplicity. Noone is going to run out of storage these days!
 

Jamster

Senior Member
Really? Somewhere i have an old PC with a whopping 8 gigabyte hard drive with the PE installed, autosave would kill that! (Not trying to put off the proposal, i think it would save me a lot of trouble)
 

MartinM57

Moderator
Simple solution - if this facility should ever appear in the PE - is a checkbox under View|Options to make in turn on and offable - defaulting to on on initial installation (or should it default to off ;))
 

BeanieBots

Moderator
Though I support this option, please be careful with how it's implemented.
I've been caught out in the past with autosaves.

You load up your file, do some edits and then get called away.
You come back 20 minutes later, can't remember what you did so opt to reload the original file, except autosave has written over it and now you no longer have the original or any idea what was done to it.

Many "Office" programs were like this a while back so the first thing to do after install was to switch off autosave.
 

geoff07

Senior Member
Lets say 40k for a large program with 1000 lines and lots of comments. And say a spare gig. That would be 25,000 copies. At 25 downloads a day, every day, that would be three years work. USB storage costs under £60/terabyte or 6 pence/gig. Hmm.
 

hippy

Ex-Staff (retired)
It is a question as to when, and how many, files are auto-saved or auto-backed-up ( on successful Syntax Checks, after Downloads, on Programming Editor closes, after X minutes ) and I'm sure something will be thought of which is practical and useful.

Like BeanieBots I've been caught out by auto-save, hacking great chunks out of a working program whilst tracking down a bug only to find I'd been inadvertently deleting the source program on disk and losing work previous done, so you can be sure I'll have opinions on how it should be implemented, and how not :)
 

Haku

Senior Member
I wouldn't like an autosave feature that saves over the file you're editing, rather it saves new revisions periodically in the programming editor's own sub folders, each with a new filename (perhaps the date+time added onto the name) so you have old revisions to refer to if you so need, with X amount of autosaves per file.



@inglewoodpete, open file explorer and put %temp% into the Address bar, it should take you directly to the temporary folder.
 

lbenson

Senior Member
>open file explorer and put %temp% into the Address bar, it should take you directly to the temporary folder

Nice tip. All I have to do now is remember about it.
 

knight

Member
I know it would be more complex to implement, but if it was being developed my vote would be for something akin to what google docs does with their shared documents.

For those that havn't met it at each edit it saves a copy of the file automatically. If you ever want to go back to a previous revision you can bring up a document history and select the revision you want to revert to, from the most recent one through until the first one.

I'd also suggest that besides autosaving on build compile you also have the option to set it to autosave after say, 15 minutes, so that you don't spend a couple of hours on a program and it dies before you download it. (unlikly i know, but i'm just trying to think outside the box)
 

techElder

Well-known member
Oh come on. Every time someone suggests a feature, one hundred programmers try to tell RevEd how to do it! :rolleyes:
 

Hydroid

Senior Member
i'm running windows7 64 bit works fine for me !

1. click on start menu
2. enter (ecode.bas) in search program and files hit return
3. new window will open search again in . click on computer
finds it within a few seconds.
Hmm, I take it back, it is there...

Usually, I use the initial search feature and it finds the file I'm looking for by narrowing down the list with each letter of the filename I enter. With 'ecode.bas', it initially came up with nothing until I hit ENTER and clicked on 'Computer' as you suggested. Will have to try and remember that.

In my case, it was in the 'C:\Users\John\AppData\Local\Temp' directory.

I haven't lost a file yet, but it's good to know that it's there should I need that trick!

John.
 

Hydroid

Senior Member
Though I support this option, please be careful with how it's implemented.
I've been caught out in the past with autosaves.

You load up your file, do some edits and then get called away.
You come back 20 minutes later, can't remember what you did so opt to reload the original file, except autosave has written over it and now you no longer have the original or any idea what was done to it.

Many "Office" programs were like this a while back so the first thing to do after install was to switch off autosave.
Amen, I often load a file to try a few changes / new ideas and then if I don't like the results, I just close without saving. Auto save would cause me grief personally, so I hope if / when it is implemented an option is included to 'enable / disable' the feature...

I've had a few instances already when I thought I liked my 'new' ideas and did hit save only to decide later that I didn't.... I was lucky that I run a program in background called 'Memeo Backup' which I've set up to backup each file on my PC along with the two previous versions, so I was able to go back and get it.

Now, I just save each new 'idea' as 'Filename R-1.bas' , 'Filename R-2.bas'.... that way there's no issue - plus, it keeps a history to allow you to go back and 'see' how the program evolved over time.

John.
 

Dippy

Moderator
Why reinvent the wheel?

Corel , Seetrax and many others have been doing autosave for donkey's.
They just stick a prefix letter to the filename and autosave to that filename or autosave to a specific folder.

Why try and make life difficult?
Does it really get any easier or more effective?

MikroC has an Auto save. Proton saves on build.

I'm not going to try and give advice on coding it , but it isn't difficult and would be a lovely touch.
For those that fuss and moan you could have a tick/check option.
Job done.
 
Top