Option to sort files and folders together

Share any ideas you have on improving Explorer++
Post Reply
Posts: 1
Joined: Sun Jul 07, 2013 9:45 am

Option to sort files and folders together

Post by etaa » Sun Jul 07, 2013 10:31 am


This topic has been brought up before but the threads were 2-3 years old so I'm hoping having a more current date will bring this request into consideration:

I found this post:
RalpH_himself wrote:Is there a way to have folders and files mixed instead of separated when selecting "Sort by Name"? The grouping function doesn't do it either...
and this one:
void wrote:I've been wandering through all kinds of different searches, tools, replacement programs, and so far, the closest to what I want is Explorer++ except for one critical feature.

The Windows Explorer habit has for as long as I can remember insisted on separating files from folders, but that's rather contrary to my workflow, and on other OSes this is not enforced. I would like the option, while in detail view, to have folders mixed in with files.

I found other programs that would do that job, but it was like having the control deck of an aircraft just to drive down the street to the store. Explorer++ is much more streamlined, and that appeals strongly to me.

Is this something that could be done fairly easily with Explorer++?
I echo void's comment that E++ is very streamlined, and having the option to intermingle files and folders would be fantastic!

Posts: 32
Joined: Fri Aug 05, 2016 9:03 am

Re: Option to sort files and folders together

Post by Janus » Tue Dec 26, 2017 6:38 am

If you look in /explorer++/shellbrowser/sortmanager.cpp there is

Code: Select all

int CALLBACK CShellBrowser::Sort(int InternalIndex1,int InternalIndex2) const
At about line 60.

It uses

Code: Select all

bool IsFolder1 = ((m_pwfdFiles[InternalIndex1].dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY) ? true : false;
bool IsFolder2 = ((m_pwfdFiles[InternalIndex2].dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY) ? true : false;
	/* Folders will always be sorted separately from files,
	except in the recycle bin. */
	if(IsFolder1 && !IsFolder2 && !CompareVirtualFolders(CSIDL_BITBUCKET))
		ComparisonResult = -1;
	else if(!IsFolder1 && IsFolder2 && !CompareVirtualFolders(CSIDL_BITBUCKET))
		ComparisonResult = 1;

This is where folders are detected I believe.
If either of them are folders outside of the recycle bin, then it returns -1, or 1, a little experimentation here could quickly show how to disable this function.
Then using the sync tree on lan mod as a guide, just add a value to the config screens and files, or on screen as a button, to toggle this.
That way all you have to do is add your check.

Code: Select all

if(IsFolder1 && !IsFolder2 && !CompareVirtualFolders(CSIDL_BITBUCKET) && !FileMix)
I don't need the function, but it should be easy for you to add if you want it.

I keep a private branch where I have disabled auto navigate up on doubleclick, it drove me nuts, and some other tweaks.
I am also integrating voidtools Everything into the search function and directory size column, so none of this is very hard.

Good luck.


Post Reply