What is the asv file in MATLAB and how do I open it?

When I edit a file, another file with the same base file name but with an ".asv" extension is automatically saved in the same folder. What is it?

Answers (2)

It's an autosaved file, like a backup of the prior version you worked on. If your .m file got lost or destroyed, I think you can rename the .asv file to .m and have back your prior version.

8 Comments

But the .asv file is not available for all the files in my workspace.is there any condition that it will be available only for specific files
When you edit a file and don't save it for a period of time.
It will be created only for m-files (not for any other files), and only on files that you've opened in the editor.
I was doing my work on a m file for last 4 hours and I did not save it. Now I accidentally turned MATLAB off and is there anyway to recover my code?
In which Matlab version were the .asv-files introduced?
No later than R14. My memory is that they existed in R13 as well. (R12 was a long time ago and my memory archives would take longer to unearth.)
It exists in R2022a (9.12.0.1896817) Mar 04 2022.
Working well for me the tips of rename the extension from .asv to .m Thanks !

Sign in to comment.

what does asv mean?

2 Comments

It's a three letter extension meant to signify AutoSave.
If you'd prefer a different extension or to customize the behavior of backup file creation and retention in certain ways, you can change the behavior in the Preferences. See the section on Backup Files preferences on that documentation page.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Asked:

on 26 Aug 2013

Commented:

on 1 Mar 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!