Config Restoring by command line

Dear friends,
Can I import DOpus settings (.ocb files) by command line? :question:

Best Regards

You could run something like this from a batch file

@dopusrt /cmd prefs BACKUPRESTORE

But to be honest I don't what you would gain as opposed to doing it from within Opus directly.

If I remember right, in older versions of Opus we could load a different configuration by doubleclicking on the saved file, but that will not work with the current version.

Dear JohnZeman,
Thanks for your reply. I tested your suggestion, but just the prefs window was opened. Am I wrong?

Best Regards

You're not wrong. That's why I mentioned you're not really gaining anything by trying to do it from the command line.

I'm leaving town now for a short while so I won't see an answer back from you until probably Saturday, but I'm curious as to why you would like to import from the command line?

Well, the answer is simple. Some of my friends have DOpus and I need to share my settings with them. The problem is their Babies!. Some times their babies changed the settings and they must import settings occasionally. If I can import settings from the command line, I can wrote a program for doing this work automatically. In this way, restoring will be very simpler too.

Since Opus stores its configuration as files, if you want to automate backup or restore you can just copy the appropriate directories. They're listed in this FAQ:

[How to backup or locate your Opus configuration (Simple))

You should obviously tell Opus to exit before copying over the configuration. You can do that from a batch file (or whatever you're using) by running:

"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /CMD Close PROGRAM

Thank you dear Leo, your offer was very helpful :blush:
However your method need more work and attention (especially in DOpus 8.x) and the final file will be very bigger in this way, but is better than a stick in the eye. :laughing: Thanks again. I hope see a command line import feature in future versions.

Best Regards

You should've mentioned that you were using Opus 8. :slight_smile: It's over a year since Opus 9 was released so unless a post says otherwise we tend to assume it's about Opus 9.

As it turns out, in Opus 8 there is a command to automate backup and restore, although I can't remember the details. Have a look in the Raw Commands section of the manual, probably under the Prefs command. (Opus 9 removed the automated command as there isn't much point to it now that the config is stored in files instead of the registry.)

Why do you say the final file would be bigger than doing it another way? It's the same data, isn't it?

I'm a bit confused because .ocb files are new to Opus 9 - Opus 8 doesn't create them and can't import them. So exactly a) what version of Opus are you using, and b) what are you trying to do?

Thanks, I will search for it.

I don't know what compression DOpus used, but my exported OCB file is 329KB, where the total size of /dopusdata and /dopusglobaldata files are 876KB! This size in addition to my program size will be more than 1MB.

As you see, The OCB file is very smaller (and easier to use if there was a command line import feature). :blush:

However, your suggestion solved my problem and I knock out my friends babies (except one of them!). :laughing:

Regards

P.S: Where can I found more information about dopusrt.exe and its switches? DOpus help file just have a short mention to it.

Don't be confused! one of my friends have v8.2.x, others have v9.x. When I change my DOpus settings, release two version of settings files. One for v8.x (made under VMWare emulator), another for v9.x.

Before the previous letter of Leo, I was told to my v8.2.x friend solve your problem by hand, you will not see any automatic solution of me. :laughing: :laughing: But now, I will search for the automated restore command mentioned by Leo and if I find it, I will solve his problem too.

[quote="searcher123"]I don't know what compression DOpus used, but my exported OCB file is 329KB, where the total size of /dopusdata and /dopusglobaldata files are 876KB! This size in addition to my program size will be more than 1MB.

As you see, The OCB file is very smaller[/quote]
OCB files are really just zip files. Nothing special going on there. The config directories are full of XML text files which will compress very well.

This time I'm a bit confused, because when I zipped the contents of these directories, the size was 611KB, just 265KB smaller than main size, still 282KB bigger than OCB file. This means some files are not embedded in OCB file. Do you know which one these files are?

Which files are included depends on which settings you used when creating the OCB backup.

If you want to compare, change the OCB file's extension to .zip and look inside it.

in Opus v8 I really really enjoyed having the Prefs command setup so that I could just double-click on .DPS files and the settings would be imported automatically. We've gone backwards in v9, and writing a script to extract the .OCB stuff and then copy to the appropriate folders and then clean up any 'temp' files and THEN exit and restart Opus is more annoying than just using the Backup & REstore gui :wink:.

One menu and one list button are still there in v9 (custom window) : Saved preferences list and Saved preferences menu.
Maybe a new feature ? :wink: