Read files from Multiple subfolders in Dual Vertical?

Hi guys,
I would like to know if the Opus can read files simultaneously from multiple subfolders in Dual Vertical?
It's weird that there is no such an option in this advanced file manager. I can't find it at least. Maybe, it can be difficult to understand what I want to do. An example below:

Let's say I have a folder named "Parent" and this folder has 2 sub-folders "Sub 1" and "Sub 2". I will turn the Dual Vertical on. Now when I click on the "Parent" I would like to see the contents of the "Sub 1" and "Sub 2" side-by-side. I can purchase the program if I can do it, since it's very important for my workflow. Thanks in advance

How would that work if Parent had more than two sub-folders?

Have you looked at Flat View? That may do what you're looking for in a slightly different way. (Flat View - Grouped is probably the mode you want.)

I will have only 2 sub-forlders in the chosen folders and apply it to a specific folder? I'm aware of Flat View but it is not a solution of my problem. Moreover, your script-button "random shuffle" doesn't work with Flat View. So, there is no option to do that?

You could write a button or context menu so that sub1 is shown (in flat view) in the left and sub2 in the right tab.

So you want "Dual-Dual"? How about placing two listers in Dual-mode next to each other?

Or do you want to just select "Parent" and have "Sub1" and "Sub2" appear in the left and right file display of one lister? That'd be rather simple.

Or do you want to just select "Parent" and have "Sub1" and "Sub2" appear in the left and right file display of one lister? That'd be rather simple.

Yes, but not just have "Sub1" and "Sub2" appear side-by.side but have the files in these sub-folders appeear side-by.side. The reason why I need this function is because I have images in Sub1 and videos in "Sub2". I have hundreds of folders with such structure

Did you see all features of flat view? It offers Grouped and Mixed/mixed without folder so just the files in all subdirs are shown / the structure is completely flattened.

I have no idea how to write a button or context menu. I started to use Opus 2 days ago. Could you explain it in more details?

Flat view doesn't help me. It provides a long list of my images from Sub1 and videos from Sub2 and overall two folders before the files. Images on the left side (Sub1) and videos on the right side (Sub2) would be nice. I expericence some problems with the flat view as I can't use the button "shuffle" created by Leo. This button doesn't work in flat view. Anyway, thanks guys for trying to help me

Sorry, i dont think i really understand your request.
When turning flatview into the "mixed without folders" mode, all files will be listed but no folders. then you can have images on the left, videos on the right and then you could turn on thumbnail view so they are not a list but preview grid.
I tried a basic button for this

<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
	<label>Go Dual Flat</label>
	<function type="normal">
		<instruction>Set VIEW=Thumbnails</instruction>
		<instruction>Go T:\parent\sub1 DUALPATH T:\parent\sub2</instruction>
		<instruction>Set FLATVIEW=On,MixedNoFolders</instruction>

Copy code, right click on menu toolbar, customize, paste and click ok. then youve got the button in your menu. Of course edit the folder paths according to your situation.

If this is not satisfying for you, you could think about writing your own "column script" so that you can group and sort files as you want to (afaik they should work in flat view too).

Thank you for the code, Felix. However, it can't find my path. Should I past the full path? Moreover, the name of the parent folder was just an example. I name the parent folders as names of different actors and sub-folders are "IMAGES", and "VIDEOS". This is my situation. Could you please modify the code, as I can't get it to work myself. Thank you in advance

Yes simply replace the full path to the both folders you want to show. you can browse for the path yourself when editing the button (when you pasted it, right click it while youre in customize mode and click edit). Sorry, i cant edit the paths since they are absolute to your system
but it should be something like

have a look at the docs in general

I just made the thumbs for the left side work, not sure where i screwed up, but it shows you in general an idea of what to do.

Thank you very much, I fixed the problem with the path and I can finally see now the contents of my sub-folders side by side. Looks amazing. But what could I do with the different parent folders which have different names? How could we turn it into variable that can change? The button relies only on one path.

Then youve got to go into scripting. Ive written some basic code for that. It assumes you are in your parent folder, looks into each subfolder (and just those, no recursive content enumeration / no subsubfolders...) and if at least one file of the filetypegroups image or movie (you have to check your file extensions are in those groups) is found, this folders will be opened. If the file types in the subfolders are mixed (images and videos) i cant say how it will behave (depending on the order the files are read/enunmerated). It just goes over the files and if it finds image first, it is considered as image folder, the same for videos. So just dont mix the file types in subfolders, and ideally just have one folder per type (again because the first folder it found will be opened) or adapt the script on your own. And only if images and videos folders are found, it will work. It worked for my test scenario.

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>do your stuff</label>
	<function type="script">
		<instruction>@script JScript</instruction>
		<instruction>function OnClick(clickData)</instruction>
		<instruction>	var imgDir = null;</instruction>
		<instruction>	var vidDir = null;</instruction>
		<instruction />
		<instruction>	//enumerate the directories (looking for image and video folders)</instruction>
		<instruction>	for (var dirEnum = new Enumerator(clickData.func.sourcetab.dirs); !dirEnum.atEnd(); dirEnum.moveNext())</instruction>
		<instruction>	{</instruction>
		<instruction>		var dirItem = dirEnum.item();</instruction>
		<instruction>		var dirType = GetDirectoryType(dirItem);</instruction>
		<instruction>		Log(dirItem + &quot; is type &quot; + dirType);</instruction>
		<instruction />
		<instruction>		//check if weve got directories already, else assign htem</instruction>
		<instruction>		if(!imgDir &amp;&amp; dirType == &quot;image&quot;)</instruction>
		<instruction>			imgDir = dirItem;</instruction>
		<instruction>		if(!vidDir &amp;&amp; dirType == &quot;video&quot;)</instruction>
		<instruction>			vidDir = dirItem;</instruction>
		<instruction />
		<instruction>		//if both found, stop here</instruction>
		<instruction>		if(imgDir &amp;&amp; vidDir)</instruction>
		<instruction>			break;</instruction>
		<instruction>	}</instruction>
		<instruction>	//if both found</instruction>
		<instruction>	if(imgDir &amp;&amp; vidDir)</instruction>
		<instruction>	{</instruction>
		<instruction>		Log(&quot;found&quot;);</instruction>
		<instruction>		var cmd = clickData.func.command;</instruction>
		<instruction>		cmd.AddLine(&quot;Set VIEW=Thumbnails&quot;);</instruction>
		<instruction>		cmd.AddLine(&quot;Go \&quot;&quot; + imgDir + &quot;\&quot; DUALPATH \&quot;&quot; + vidDir + &quot;\&quot;&quot;);</instruction>
		<instruction>		cmd.AddLine(&quot;Set FLATVIEW=On,MixedNoFolders&quot;);</instruction>
		<instruction>		cmd.Run();</instruction>
		<instruction>	}</instruction>
		<instruction>	else</instruction>
		<instruction>		Log(&quot;nothing found&quot;);</instruction>
		<instruction />
		<instruction>//check which files are in dir, if one matches video or img, return this</instruction>
		<instruction>function GetDirectoryType(dir)</instruction>
		<instruction>	var folderEnum = DOpus.FSUtil.ReadDir(dir);</instruction>
		<instruction>	while (!folderEnum.complete)</instruction>
		<instruction>	{</instruction>
		<instruction>		var item = folderEnum.Next();</instruction>
		<instruction>		if (!item.is_dir)</instruction>
		<instruction>		{</instruction>
		<instruction>			if(item.InGroup(&quot;Images&quot;))</instruction>
		<instruction>				return &quot;image&quot;;</instruction>
		<instruction>			if(item.InGroup(&quot;Movies&quot;))</instruction>
		<instruction>				return &quot;video&quot;;</instruction>
		<instruction>		}</instruction>
		<instruction>	}</instruction>
		<instruction />
		<instruction>function Log(msg){DOpus.Output(String(msg));}</instruction>

FANTASTIC!! Felix, thank you so much for your contribution!!
PS: Just one thing - Do you know how to get the files as thumnails always? It displays files as details. I tried some settings, seems it doesn't remember my settings, when I open a folder agan. Thank you again for the solution!!

Opus FAQs at the top of page, then the first item.

I set my lister as default lister and choose the view as thumbnails but seems like it doesn't remeber it when I open folders again :slight_smile:

That isn’t what the FAQ says to do.

Ok. Is this the FAQ you are referring to?

This one, first in the menu at the top: