Tabs do not open in order selected in Windows Explorer
-
@Alan-Kilborn
I’ll try. Given the following list of path names:C:\Notepad++\functionList\batch.xml C:\Notepad++\functionList\c.xml C:\Notepad++\functionList\cobol.xml C:\Notepad++\functionList\cobol-free.xml C:\Notepad++\functionList\cpp.xml C:\Notepad++\functionList\cs.xml C:\Notepad++\functionList\fortran.xml
If I select the list as shown, by marking from bottom to top and leave the cursor on the top entry (
batch.xml
) and drag the selection onto an Npp session, the files will be opened in alphabetical order. However, if I drag the same selection but this time start with the cursor oncs.xml
, the list Npp (or any other application) receives is actually:C:\Notepad++\functionList\cs.xml C:\Notepad++\functionList\fortran.xml C:\Notepad++\functionList\batch.xml C:\Notepad++\functionList\c.xml C:\Notepad++\functionList\cobol.xml C:\Notepad++\functionList\cobol-free.xml C:\Notepad++\functionList\cpp.xml
so the tabs are opened as received, but not in the strict alphabetical order of the marked area. Note: I used an alphabetically sorted list to make it easier for me (it’s my modus operandi), Explorer uses the sort order of the source folder (date, size, etc.). But, Explorer starts with the pathname under the cursor first, iterates to the end of the marked block, and then jumps to the start of the block to complete the list of paths to be passed to the application.
BTW: It’s not UI feature I like, but there seem to be many ways the kids in Redmond tried to make life in Windows too friendly and missed the target.
-
Ah, interesting.
Thanks for the explanation.
I didn’t try it, but I’ll take you at your word.I’ve often wondered where multiple files operations like this obtain their sometimes-odd order; now I have a better idea.
-
@artie-finkelstein is absolutely right here, wanted to reply the same like he.
In short:
Do the right click on the first file you want to have in the Editor. The following files are added one by one like they appear in your explorer window (sorting by name or date etc is respected). At the end of list wraps around to the begin and continues until the right clicked file is reached.Same for drag and drop. Start dragging with focus on the first file you want in the editor.
-
Not following what you mean about “right click”, i.e., your first paragraph. In Explorer, experimenting, I can’t get any kind of multi-file selection with right-clicking. Of course, I can get it with left-click with Shift or Ctrl added.
Your second paragraph is a concise summation of @artie-finkelstein 's longer explanation, but adds no new information.
-
Left click to select items for the group
Right click or left click before dragging the group -
@artie-finkelstein said in Tabs do not open in order selected in Windows Explorer:
Right click or left click before dragging the group
Ah, okay, although I’ve never thought to right-click and drag-n-drop a file(s) into another application.
-
I think that right-clicking would be used to select “Edit with Notepad++” from the context menu.
-
@Stefan-Pendl said in Tabs do not open in order selected in Windows Explorer:
I think that right-clicking would be used to select “Edit with Notepad++” from the context menu.
When I try this with
a.txt
,b.txt
,c.txt
…h.txt
in a folder and I select them one at a time, in order froma
toh
via Ctrl+Lclick, and then I right-clickc.txt
and chooseEdit with Notepad++
, I get, from left to right tabs in N++ once it loads them:d, e, c, f, b, h, g and a.
I fail to see a pattern there.
-
@Alan-Kilborn
I’d never tried it that way. I Ctrl Left clicked a series of files (every other one) and then Right clicked and selected ‘Edit with Notepad++’ and it still followed the scheme I tried to describe in 68868, but, I didn’t properly amplify one detail then: The file list order is based on the Explorer sort order of the folder, not the order the files are clicked in. BTW: changing sort order will unselect any left clicked files.There may also be OS differences (I’ve not had a chance to use any of the Win10 variants).
-
We are probably wandering off-topic here, but it is a bit interesting.
So for great fun I took this selection in Explorer and dragged it by the
e.txt
file into Notepad++ and also Visual Studio 2019:The results:
Entirely opposite tab orders. :-)
And, from an intuitive point of view, since the drag point was
e.txt
, I’d have thought that would be made the active file tab – but it wasn’t in either program.OK, maybe I’m done with this now. :-)
-
@Alan-Kilborn said in Tabs do not open in order selected in Windows Explorer:
Not following what you mean about “right click”, i.e., your first paragraph. In Explorer, experimenting, I can’t get any kind of multi-file selection with right-clicking. Of course, I can get it with left-click with Shift or Ctrl added.
Sorry, that I was not clear enough. The precondition to my previous post is, that you have already selected multiple files in any way you like (Ctrl + Left Click, Shift + Left Click, or even with mouse selection rectangle). The important thing is: the focus in next step. I.e. on which file you do the right click or start the drag action.
@MarkusBodensee said in Tabs do not open in order selected in Windows Explorer:
Do the right click on the first file you want to have in the Editor. The following files are added one by one like they appear in your explorer window (sorting by name or date etc is respected). At the end of list wraps around to the begin and continues until the right clicked file is reached.
Same for drag and drop. Start dragging with focus on the first file you want in the editor.
In your recent post, you verified what I posted for Notepad++, thanks :-)
For the situation in your post before your recent post, where you failed to see a pattern: I don’t know what went wrong there.
When I am doing your steps (and order by name in explorer is active), I get the following order in Notepad++: c, d, e, f, g, h, a, b -
Example with picture:
Select some files, order of selection doesn’t matter, but right click is done on cs.xml:
Order in Notepad++:
Hope it helps somebody to understand, even if it is nearly the same like your example. Yes, it adds no new information… but hopefully more clarity.