go to file with different extension

English support forum

Moderators: petermad, Stefan2, white, Hacker

User avatar
petermad
Power Member
Power Member
Posts: 16709
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: go to file with different extension

Post by *petermad »

2oko
but it doesnt work always
You are right - it only seems to work correctly when the panel is sorted by extension, and if the cursor is placed on the first file with a given extension.

You can try this instead:

Code: Select all

[em_goto_next_ext]
cmd=cm_ClearAll,cm_SelectCurrentExtension,cm_GoToLast,cm_GoToPrevSelected,cm_GoToNext,cm_ClearAll

[em_goto_previous_ext]
cmd=cm_ClearAll,cm_SelectCurrentExtension,cm_GoToFirstFile,cm_GoToNextSelected,cm_GoToPrev,cm_ClearAll
It still only works OK when sorted by extension, and any selections (marking of files) will be not be preserved.
License #524 1994
Danish TC Translator
TC 11.57b3 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1407a
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
oko
Senior Member
Senior Member
Posts: 294
Joined: 2007-05-03, 16:22 UTC

Re: go to file with different extension

Post by *oko »

2petermad
try Fla$her's command, it works very well in both cases (sorted or not by extension) although it cancels eventual selection too. Your solution doesnt work when unsorted.
Fla$her wrote: 2026-02-12, 15:06 UTC 527,525,3305,2053,524 — navigate to the file with the next extension
527,525,3305,2054,524 — navigate to the file with the previous extension
sa16
Senior Member
Senior Member
Posts: 358
Joined: 2021-09-10, 07:15 UTC

Re: go to file with different extension

Post by *sa16 »

Fla$her wrote: 2026-02-12, 15:06 UTC It's not as clean and elegant, but it might suit you.
In my opinion, this solution from Flint (CaptainFlint), proposed 16 years ago, remains very elegant.
Fla$her
Power Member
Power Member
Posts: 3459
Joined: 2020-01-18, 04:03 UTC

Re: go to file with different extension

Post by *Fla$her »

The solution is writing code, not someone else's chatter. The current solution has 3305. So not "this".
And even in this form it cannot be elegant for a number of well-known reasons. Actually, that's why I used it quite rarely.
But a solution with Autorun is a different matter.
Overquoting is evil! 👎
Post Reply