- You use PostMessage (or SendMessage to wait for a notification that the message has been received), with WM_COMMAND, and the correct menu item ID.
- I would experiment by sending messages to the Explorer folder window, and also to its controls.
- This script can be used to retrieve the menu item IDs for a menu:
Get Info from Context Menu (x64/x32 compatible) - AutoHotkey Communityhttps://autohotkey.com/boards/viewtopic.php?f=6&t=31971
- Note: some menu item IDs are constant, but others change each time, and some require that the menu be initialised (e.g. you nudge/refresh the menu via WM_INITMENU).

- If you compare Windows XP and Windows 7, it's harder to drag-and-drop files from one folder to another.
- This is because 'full row select' mode was added to the 'Details' view in Windows 7 (or perhaps Windows Vista). I.e. you can't simply drag-and-drop files to empty space, each bit of empty space is associated with a file (it is part of a row that extends from left-to-right).
- You could accidentally add a file to an archive, or launch an application, for example.
- A workaround is to drag-and-drop files to the title bar.

COPY AS PATH

- From Windows Vista onwards, you can select some files and do shift+right-click, or shift+Menu key to show a menu, and then choose 'Copy as path' to put the paths of the selected files onto the clipboard.

- Note: you can paste these into the address bar of an Explorer window or into the Run dialog (which you can show by pressing Win+R).
- Environment variables like %appdata%, %temp%, %username%, and 'shell:' folders like shell:Desktop will be resolved.

- Many thanks for your script drozdman. Much appreciated.
- This does certain things far more simply than my current approaches:
Explorer column interaction (get/set: which appear, width, ascending/descending order) - AutoHotkey Communityhttps://autohotkey.com/boards/viewtopic.php?f=6&t=33129
- Any info about how you came across this? Thanks.

In Windows 10 that message toggles sort ascending/descending for the first column whichever column that is.
For example if the user has dragged to rearrange columns so that the Type column is first then the Type column sort direction is toggled by the command, not the Name column.

Similarly 31493 toggles sort ascending/descending for the second column, 31494 for the third, and so on.

This means that variants of this message can make a Windows 10 File Explorer window sort the folder contents by Name, Type, Date modified, Size, Date created, Authors, Title and so on.

This also means that a script that in part changes the Explorer sort order must, in order to be portable between different PCs, add steps that first checks the Explorer column order on the current PC and then sends the correct message based on that information.