FR: Go TABGROUPSAVESUBFOLDERS

If I have a folder with many subfolders that I want to save as a tab group it would be handy to have a command - e.g. Go TABGROUPSAVESUBFOLDERS - to do this based on all folders in the currently active tab. This would be particularly useful in situations where the list of subfolders is (a) long and (b) changes frequently.

Regards, AB

You could instead use a script that is passed a folder path and then opens all child folders as tabs. Then nothing needs re-saving when the child folders change, as a big benefit.

I created a quick script to do just that, opening the first subfolder in a new lister then looping through the rest of the subfolders and opening (using Go commands) in new tabs. It is quite slow and a lot of display flashing is involved as each new tab is added. There may, of course, be a slicker way than my hack.

Regards, AB

If you open the new tabs with NEWTAB=nofocus it should prevent the flickering. as they'll open in the background and leave the first tab active.

Thanks. That makes a big difference.

As suggested by Leo, Here is a simple button command to open a new lister with tabs for the current folder and all of its subfolders.

[code]function OnClick(clickData){
clickData.func.command.deselect = false;
var src = clickData.func.sourcetab;
var cmd = DOpus.create.command;
var folders = src.dirs;
var n = folders.count;

var str ='Go CURRENT NEW=source';
cmd.addline(str);
DOpus.clearoutput;
if (n!=0){
	cmd.addline("[")
	for (var i = 0; i < n; i++){
		str ='Go "' + folders(i) + '" NEWTAB=nofocus';
		cmd.addline(str);
	}
	cmd.addline("]")
}
cmd.run;

}[/code]
It works well with vertical tabs. Here is a before and after example. Note that the second screen grab represents a new lister which becomes the source:




Regards, AB