Jump to content
alogrep

IDE stopped saving to *.~

Recommended Posts

Hi

I noticed that the IDE (suddemnly) does not save the current Unit to the *.~ when I 

edit and save a Unit. What should I do to restore this feature?

Thanks

 

Share this post


Link to post

Thanks.

But I cannot find "Create backup fiels" (see attached please)

 

editor.jpg

Share this post


Link to post

Thanks both. I did check "Create backup files" But it did not crate   a "*.~pas .

I changed unit3a.pas, sdaved the chage, and whe  I look in DOS i see 

 Directory of C:\hm\posdev

24/03/2023  09:01 p. m.           111,252 unit3a.~pas

but I changed today: 08 Jan 2024!!!!

Share this post


Link to post

Roger, sorry. I am talkng about this: since Delphi 5, everytime I saved a pas/dfm u nit, it would create a ~pas/~dfm AUTOMATICALlY.

I did not have to go to _history (or _math), no, where the pas was, the ~pas was created.

In the last couble of months this stopped happening. How Do I reestore taht useful feature?

 

Share this post


Link to post
Posted (edited)

The History tab the IDE editor shows them and lets you compare between the different versions.  At the bottom right there are Code Design and History tabs. When the History tab is active there are Contents, Information and Differences tabs on the bottom left.  

 

There is also an Autoreover feature that will periodically save changes to modified files (default every 10 minutes) to a _recovery directory in case the IDE crashes. IDE -> Saving and Recovering. 

Edited by Brian Evans

Share this post


Link to post
On 1/8/2024 at 11:56 AM, alogrep said:

Roger, sorry. I am talkng about this: since Delphi 5, everytime I saved a pas/dfm u nit, it would create a ~pas/~dfm AUTOMATICALlY.

I did not have to go to _history (or _math), no, where the pas was, the ~pas was created.

In the last couble of months this stopped happening. How Do I reestore taht useful feature?

 

Newer Delphi versions do not create these files anymore since that did only allow one single backup version to be maintained. The _history folder allows multiple versions of the backup, which is much more useful in my opinion.

  • Like 2

Share this post


Link to post

Hola Peter (not Paul!) Below😀.

What happend:  there was a power failure. I exit the IDE (saving wip).  The PC was "shutting down" but the UPS ran out of battery before the shutting down terminated. Now the .pas file I am interested in is full of 

'0' (checked with a binary file viewer. The history shws the file and the Buffer both empty.

Withe the old system, the ~pas file that had been saved previusly, I would have lost the .pas and the wip,

but I could have retrieved the .~pas. Here, I lost everything. 

Share this post


Link to post

...and if you look in the sub directory __history you would find files *.pas.~1~   (and possibly *.pas.~2~ and  *.pas.~3~ etc). These are the backup copy(s) you need. (The one with the highest number is the most recent). 

Share this post


Link to post
15 hours ago, alogrep said:

Hola Peter (not Paul!) Below😀.

What happend:  there was a power failure. I exit the IDE (saving wip).  The PC was "shutting down" but the UPS ran out of battery before the shutting down terminated. Now the .pas file I am interested in is full of 

'0' (checked with a binary file viewer. The history shws the file and the Buffer both empty.

Withe the old system, the ~pas file that had been saved previusly, I would have lost the .pas and the wip,

but I could have retrieved the .~pas. Here, I lost everything. 

Which Delphi version are you using? If Delphi 10 or newer you should have _history and _recovery folders in the project's folder, look there. And for the future: make sure you have the autosave feature enabled in the IDE options dialog!

image.thumb.png.38734ba983ade851e97750183bd1d16a.png

Share this post


Link to post

Check your settings for auto backup or temporary file creation and also check the feature is enabled in the preferences or options menu.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×