How to open multiple paths in different tabs?

How to open multiple paths in different tabs quickly? Thanks.

Hold the Alt key when you double-click them.

The examples of the paths I want to open are listed below.

\\pc1\D$
\\pc2\C$
\\pc3\C$

So you want a function that opens all three paths in new tabs?

Go \\pc1\D$ NEWTAB
Go \\pc2\C$ NEWTAB
Go \\pc3\C$ NEWTAB

Or you could use a Tab Group.

Is there a way like Create folders? DO shows up a window, then users input/paste multiple paths and click a button to open them. If no such method is provided, how to do it using a function?

There's nothing like that built-in but a script could do it fairly easily.

How to do it using a script? I don't know how to start. Please provide more detailed explanation. Thank you.

We can write it for you but it will take a couple of days as it's Saturday here.

Thanks a lot. Have a nice weekend.

Here's a basic script that lets you paste a list of paths to open in new tabs.

(One path per line. Without quotes. Must be fully qualified and not relative to the current folder.)

Test JScript.dcf (2.2 KB)

  • Click the .dcf file to download it
  • In Opus use Settings > Customize Toolbars to enter editing mode
  • Drag the .dcf file to your toolbar
  • Click OK in the Customize window to save the change.

Script code for reference:

function OnClick(clickData)
{
	var cmd = clickData.func.command;
	var anyPaths = false;

	var dlg = clickData.func.Dlg();
	dlg.template = "GetPaths";
	if (!dlg.Show()) return;
	var paths = (dlg.Control("editPaths").value + "").split("\r\n");
	for (var i = 0; i < paths.length; ++i)
	{
		var p = paths[i];
		if (p == "") continue;
		cmd.AddLine("Go NEWTAB=findexisting PATH=\"" + p + "\"");	
		anyPaths = true;	
	}

	if (anyPaths)
	{
		cmd.Run();
	}
}

Resources:

<resources>
	<resource name="GetPaths" type="dialog">
		<dialog fontsize="8" height="180" lang="" standard_buttons="ok,cancel" title="Open multiple paths in tabs" width="270">
			<control halign="left" height="150" multiline="yes" name="editPaths" resize="wh" title="" type="edit" width="258" x="6" y="6" />
		</dialog>
	</resource>
</resources>
5 Likes

Thank you very much. This is what I need. I hope this feather will be a built-in function in the future.