Programmatically sort folders in Windows 8

Windows 8 does not seem to preserve the sort order for individual folders. I assume that when explorer.exe terminates (for example, upon reboot), are these settings discarded? It beats me, everything that I know, after some time (for example, several days), these preferences are completely lost.

Is there a way to duplicate programmatically sorting folders in Windows Explorer (selecting one of the "Sort by" options in the context menu)?

So, let's say I have a folder open in the Windows user interface. Let's say that the folder is currently configured to sort by name and after starting a program that will sort it by size, I will again check the sort order in Windows Explorer, and now it says “Size”?

I have some big folder structure in which I want all this and its subfolders to be sorted by size permanently. Therefore, I would like to run this program before viewing them, and do not have to manually manually sort them all over again. Thank!

+4
source share
2 answers

The sort order refers to the view, not the folder. In one folder, you can open two Windows Explorer windows, each of which has a different sort order.

, Windows , DShellWindowsEvents:: WindowRegistered shellwindows, , WindowRegistered , , Windows. , QueryActiveShellView, . , QI IFolderView2, SetSortColumns.

" Windows Explorer Internet Explorer" , , IShellView:: SelectItem, SHOpenFolderAndSelectItems .

+8

All Articles