Save open listers and tabs periodically or on change

I never shut down my computer and Dopus is running 24/7 only for the computer to hang or something to crash it and there I lose all my open folders and listers since the last Dopus restart.

I looked around the forum and also in the commands but didn't manage to find anything helpful for my case.
Restarting dopus just to save the folder layout is both inefficient and problematic as it can lead to spin-up of disks that were on standby. I do not need to save a specific layout - but only restore the one that was active before the crash.

It would be useful to be able to save open folder layout periodically without having to relaunch Dopus or better yet, save it on every new tab, folder change etc, the same way web browsers preserve their open tabs in a session.

Any thoughts on this are appreciated.

You could have a script which runs on events and saves everything into a named layout. (The double-click event is probably a good candidate. On the other hand, running it on the folder-tab or folder-change events may not be a good idea because those get run when opening a layout, for every tab potentially, and the layout may be saved in an incomplete state if you save it in the middle of loading it.)

Or you could use task scheduler to trigger layout saving. (You'd probably want a bit of logic to check if Opus is actually running, then use dopusrt.exe to tell it to save everything to a layout if it is. That can be done with VBScript pretty easily and I can give you something pre-made which does most of it already if you want to go down that route.)

Thanks for the tips leo.
Seems I had a misconception about the default lister layout.

  • I created a new layout.
  • Set that layout as startup layout.
  • Added a button to the toolbar for when I want to manually save it:
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>Save Layout</label>
	<icon1>#filesave</icon1>
	<function type="normal">
		<instruction>Prefs LAYOUTSAVE=updatecurrent LAYOUTNAME=MainLayout</instruction>
	</function>
</button>
  • Will write a c# called as a scheduled task which will check if dopus is running and exec the dopusrt command.
  • Might add some backup with rotation so old session don't get lost because of something stupid.

Cheers.

I also think "automatically save the layout every so often" is a needed feature. Minutes ago Opus silently crashed after I clicked "Undo" on the "Rename Panel" and I lost the list of open tabs.

+1

For three reasons:

  • system crashing/hanging (it's very rare these days, but BSODs/hangs still hit me)
  • power blackouts
  • shell extensions/plugins/network making trouble -> need to kill DO and restart
  • stability of DO itself is not where it was since v10

Now I count 4 reasons, even better. o)

If there are any unfixed crashing bugs which you're seeing, please send us details and crash dumps.

I checked and there was no crash dump that time. I was renaming large numbers of files in batches. I did not try to reproduce it because I really don't remember everything I did and in what order. If I encounter the problem again later, I'll check again to see if that time there will be a dump.

I can't believe automatic restore is not a feature. I depend on tabs, because I use those for active clients. If anything crashes on my laptop, I have to rebuild the tabs. There must be a periodic save and restore on restart. DOpus is too well designed for that to be missing.

This just happened. My laptop failed to come out of sleep, and I had to do a hard restart. When DOpus restarted, the list of clients was at least two weeks old. I searched the settings, and I was convinced that I was just misinterpreting the settings. Is there no way to do this?

You could have a script that automatically saves all open windows to a layout on an event like opening a new tab or changing folders. Nothing is built-in, though.

If you're maintaining important information just in which folder tabs are open and need to keep it over weeks, saving a layout manually every so often may be enough. Settings > Lister Layouts > Save All Listers (or Save This Lister to save just the active window).

Dopus Layout Saver
A simple c# .net app to backup and save a specific layout at set time intervals.
Make it run as a scheduled task with the layout name as argument and set the interval.

Layouts location:

%appdata%\GPSoftware\Directory Opus\Layouts

Example result:

  • Dev.oll
  • Dev.oll.bak-2017-01-04_18-01-55
  • Dev.oll.bak-2017-01-04_18-21-38

More info on github.

Notes:

  • 32bit version cannot locate 64bit dopus. Use x64 executable for x64 dopus.
  • Built with .NET Framework 4.5.2 / Windows 10; might not work on WinXP

Thanks, apocalypse! I'll try this and report back.

--Robert

Sorry for resurrecting this old thread but it suggested this one as I was typing up my own new thread on the subject.

I was just wondering if I could save all my open listers on shutdown, but periodically might be just as good. Has this been implemented or has a workaround been developed?

Thanks!
Tim

Saving on shutdown is automatic. Turn on Preferences / Launching Opus / Startup / Open the Listers that were open when the program was last closed to load what was saved again next time Opus is launched.

Note: Shutdown means exiting Opus or shutting down Windows. Closing the window does not normally exit the program (unless "Shutdown Directory Opus when last Lister closes" is turned on, and no other windows are open). There are separate options to remember and restore the last closed window if you want that instead.

Thanks for the info. I may be misunderstanding and/or not explaining well. I set up saved listers for every project I'm working on. I tend to add and change tabs as I'm working. Then, when I close that lister, all those changes go away unless I save the lister before closing the lister. I guess what I'm looking for is to save the current lister's state, tabs etc, on close. Does that make sense?

If you're using layouts, you could have a script which saves over them when you close one of their windows. Probably only makes sense with single-window layouts.