Page 1 of 1

What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Mon Jun 17, 2024 12:36 pm
by Phil09
Multiple .prg_Snapshots folders and .evsettings files appeared in my Eviews work folders that I did not notice before. Had they been there all along but were hidden from view? If so, how can I hide them again? What are the uses of these folders/files?

Re: What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Mon Jun 17, 2024 2:53 pm
by EViews Gareth
You can tell Windows to not show hidden folders/files, then you won't see them.

Snapshot folders contain the automatic (or manual) backups/snapshots of the workfile or program.

.evsettings on programs contains the debugging information when debugging a program.

Re: What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Tue Jul 30, 2024 10:24 am
by Phil09
Company IT policy would not allow me to change hidden file settings. Is there a way to ask EViews software to not generate these files?

Re: What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Tue Jul 30, 2024 10:26 am
by EViews Gareth
Options->General Options->Snapshots

Re: What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Fri Jul 17, 2026 5:09 am
by uyanikcaner
Is there any way to open the last saved snapshot of a workfile using an Eviews code? Do we have to click view->snapshots->open or ->revert to every time? Do you have any future plans for this?

Re: What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Sat Jul 25, 2026 6:33 pm
by EViews Steve
While there isn't an EViews command to automatically open a snapshot, you can do it programmatically.

First, EViews snapshots are usually saved in the same folder as the base workfile/program. The folder is hidden and the folder name just starts with the name of the base file followed by "_Snapshots". For example, if you have a workfile named "simple.wf1", the snapshot folder name would be "simple.wf1_Snapshots".

Next, the snapshots in that folder are just copies of the original workfile/program. The only difference is that each snapshot is prefixed with "snapshot_" (instead of the original base name) followed by the current date and time (local). There's also a matching JSON text file for each snapshot that contains some metadata. For our "simple.wf1" example, you might see:
  • snapshot_20260725_180156.json
  • snapshot_20260725_180156.wf1
Because snapshot_20260725_180156.wf1 file is just a regular workfile, you can open this using our WFOPEN command. You just have to figure out the path.

Here's an example EViews Program that does this for a given folder and workfile name:

Code: Select all

'================================================================== ' Find the most recent .wf1 file in "<StaticName>_Snapshots" '================================================================== '--- 1. Inputs: set these as needed ------------------------------- %basepath = "C:\files\" ' folder that CONTAINS the snapshots folder %staticname = "simple.wf1" ' your static file name (no extension needed) '--- 2. Build the snapshots subdirectory path --------------------- %subdir = %staticname + "_Snapshots" %snapdir = %basepath + %subdir '--- 3. Make sure the folder actually exists ----------------------- if @folderexist(%snapdir) = 0 then statusline Folder not found: {%snapdir} stop endif '--- 4. Get the list of ALL files in that folder -------------------- %filelist = @wdir(%snapdir, "f") !nfiles = @wcount(%filelist) if !nfiles = 0 then statusline No files found in {%snapdir} stop endif '--- 5. Walk the list, keeping only .wf1 files, track the "largest" name %latest = "" !found = 0 for !i = 1 to !nfiles %candidate = @word(%filelist, !i) %ext = @lower(@right(%candidate, 4)) ' last 4 chars, e.g. ".wf1" if %ext = ".wf1" then !found = 1 if %latest = "" then %latest = %candidate else if %candidate > %latest then %latest = %candidate endif endif endif next if !found = 0 then statusline No .wf1 files found in {%snapdir} stop endif '--- 6. Report / use the result ------------------------------------- %latestpath = %snapdir + "\" + %latest 'statusline Most recent .wf1 snapshot: {%latest} 'statusline Full path: {%latestpath} ' Example of using it: wfopen {%latestpath}
Steve

Re: What to do with the .prg_Snapshots folders and .evsettings files?

Posted: Thu Jul 30, 2026 1:31 am
by uyanikcaner
While there isn't an EViews command to automatically open a snapshot, you can do it programmatically.

First, EViews snapshots are usually saved in the same folder as the base workfile/program. The folder is hidden and the folder name just starts with the name of the base file followed by "_Snapshots". For example, if you have a workfile named "simple.wf1", the snapshot folder name would be "simple.wf1_Snapshots".

Next, the snapshots in that folder are just copies of the original workfile/program. The only difference is that each snapshot is prefixed with "snapshot_" (instead of the original base name) followed by the current date and time (local). There's also a matching JSON text file for each snapshot that contains some metadata. For our "simple.wf1" example, you might see:
  • snapshot_20260725_180156.json
  • snapshot_20260725_180156.wf1
Because snapshot_20260725_180156.wf1 file is just a regular workfile, you can open this using our WFOPEN command. You just have to figure out the path.

Here's an example EViews Program that does this for a given folder and workfile name:

Code: Select all

'================================================================== ' Find the most recent .wf1 file in "<StaticName>_Snapshots" '================================================================== '--- 1. Inputs: set these as needed ------------------------------- %basepath = "C:\files\" ' folder that CONTAINS the snapshots folder %staticname = "simple.wf1" ' your static file name (no extension needed) '--- 2. Build the snapshots subdirectory path --------------------- %subdir = %staticname + "_Snapshots" %snapdir = %basepath + %subdir '--- 3. Make sure the folder actually exists ----------------------- if @folderexist(%snapdir) = 0 then statusline Folder not found: {%snapdir} stop endif '--- 4. Get the list of ALL files in that folder -------------------- %filelist = @wdir(%snapdir, "f") !nfiles = @wcount(%filelist) if !nfiles = 0 then statusline No files found in {%snapdir} stop endif '--- 5. Walk the list, keeping only .wf1 files, track the "largest" name %latest = "" !found = 0 for !i = 1 to !nfiles %candidate = @word(%filelist, !i) %ext = @lower(@right(%candidate, 4)) ' last 4 chars, e.g. ".wf1" if %ext = ".wf1" then !found = 1 if %latest = "" then %latest = %candidate else if %candidate > %latest then %latest = %candidate endif endif endif next if !found = 0 then statusline No .wf1 files found in {%snapdir} stop endif '--- 6. Report / use the result ------------------------------------- %latestpath = %snapdir + "\" + %latest 'statusline Most recent .wf1 snapshot: {%latest} 'statusline Full path: {%latestpath} ' Example of using it: wfopen {%latestpath}
Steve
Thank you Steve. It worked!