Hotkey to jump to the last folder in the active panel

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
fm-xvid
Junior Member
Junior Member
Posts: 71
Joined: 2007-10-09, 05:28 UTC

Hotkey to jump to the last folder in the active panel

Post by *fm-xvid »

I am not sure if this is already available in totalcmd and my searches are coming up short.

As per title, I would like to assign a hotkey to quickly jump to last folder in the active panel. Something like how 'Home' and 'End' key goes to the top and bottom of the active panel.

Can someone help me with this? Thanks
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *Gral »

Use command chain to build custom command, e.g.

Code: Select all

[em_GoToLastFolder]
cmd=cm_GoToFirstFile,cm_GotoPrev
and assign to hotkey.
Fla$her
Power Member
Power Member
Posts: 2299
Joined: 2020-01-18, 04:03 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *Fla$her »

2Gral
It won't work if there are no files. It will work this way:

Code: Select all

TCFS2.exe /ef if(msg(1074,1010+msg(1074,1000))>-1,tcm(2050)+tcm(2056),tcm(2057))
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Hotkey to jump to the last folder in the active panel

Post by *petermad »

Or put this in your usercmd.ini file:

Code: Select all

[em_HideFiles]
cmd=cd |*

[em_GoToLastFolder]
cmd=cm_SaveSelection,em_HideFiles,cm_GoToLast,cm_SrcAllFiles,cm_RestoreSelection
and then make a button or a hotkey with the em_GoToLastFolder command.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
fm-xvid
Junior Member
Junior Member
Posts: 71
Joined: 2007-10-09, 05:28 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *fm-xvid »

Gral wrote: ↑2023-06-10, 00:58 UTC Use command chain to build custom command, e.g.

Code: Select all

[em_GoToLastFolder]
cmd=cm_GoToFirstFile,cm_GotoPrev
and assign to hotkey.
Thanks, this works well.
fm-xvid
Junior Member
Junior Member
Posts: 71
Joined: 2007-10-09, 05:28 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *fm-xvid »

Fla$her wrote: ↑2023-06-10, 03:13 UTC It won't work if there are no files. It will work this way:

Code: Select all

TCFS2.exe /ef if(msg(1074,1010+msg(1074,1000))>-1,tcm(2050)+tcm(2056),tcm(2057))
I don't have TCFS2, on the download page, there is only 32-bit version, will it work on 64-bit totalcmd?
fm-xvid
Junior Member
Junior Member
Posts: 71
Joined: 2007-10-09, 05:28 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *fm-xvid »

petermad wrote: ↑2023-06-10, 11:23 UTC Or put this in your usercmd.ini file:

Code: Select all

[em_HideFiles]
cmd=cd |*

[em_GoToLastFolder]
cmd=cm_SaveSelection,em_HideFiles,cm_GoToLast,cm_SrcAllFiles,cm_RestoreSelection
and then make a button or a hotkey with the em_GoToLastFolder command.
Thanks, this works well too. Though I am curious to know the reason behind cm_SaveSelection and cm_RestoreSelection.
Fla$her
Power Member
Power Member
Posts: 2299
Joined: 2020-01-18, 04:03 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *Fla$her »

fm-xvid wrote: ↑2023-06-10, 13:33 UTCwill it work on 64-bit totalcmd?
Of course.
fm-xvid wrote: ↑2023-06-10, 13:36 UTC Though I am curious to know the reason behind cm_SaveSelection and cm_RestoreSelection.
Games with filtering remove the selection. This approach, of course, is entertaining, but I would use my own solution, since there are no unnecessary actions and flickering in it.
Overquoting is evil! πŸ‘Ž
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *tuska »

Fla$her wrote: ↑2023-06-10, 13:52 UTC ... flickering ...
This behavior does not occur when using a contemporary PC.

In C:\Windows (Windows 11) there are 80 folders and 27 files.
em_GoToLastFolder causes a delay-free positioning of the cursor on the folder "WUModels".

Even in C:\Windows\WinSxS\ with 19248 folders and 2 files the delay is minimal, i.e. <1 second.

TCFS2 is a tad faster in the C:\Windows\WinSxS\ folder.
If you look at it this way: Theoretically, flickering should also occur with TCFS2.
Fla$her
Power Member
Power Member
Posts: 2299
Joined: 2020-01-18, 04:03 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *Fla$her »

tuska wrote: ↑2023-06-10, 15:52 UTC This behavior does not occur when using a contemporary PC.
Contemporaneity doesn't determine performance. There can be a big gap between a weak office PC and a powerful gaming PC. πŸ˜‰
The disappearance/appearance of files with the removal and restoration of the selection in fact takes much longer to render than moving the cursor to the first file and the position above. These are incomparable things.
Have you tested the command with full selection (Ctrl+A)?
tuska wrote: ↑2023-06-10, 15:52 UTC If you look at it this way: Theoretically, flickering should also occur with TCFS2.
In the case of TCFS2, the list doesn't change in any way either externally or quantitatively, so there is nothing to flicker. πŸ™…β€β™‚οΈ
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Hotkey to jump to the last folder in the active panel

Post by *petermad »

2fm-xvid
Thanks, this works well too. Though I am curious to know the reason behind cm_SaveSelection and cm_RestoreSelection.
em_HideFiles clears any selections you might have made - so I have cm_SaveSelection and cm_RestoreSelection there to save the selections before and reinstate them ad the end. I f you don't think that you will ever make selections before using em_GoToLastFolder then you can remove the two commands.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *tuska »

Fla$her wrote: ↑2023-06-10, 19:44 UTC Have you tested the command with full selection (Ctrl+A)?
No.
I did not see any reason to do so.

Who marks the contents of a folder beforehand if he wants to get to the last folder? :roll:
This can only be someone who would like to see a new screen setup with em_GoToLastFolder.
But Ctrl+A is counterproductive in this case.

Perhaps my "additional descriptions" were not ideal.

For me, however, only the test result counts,
i.e. TCFS2 is slightly faster and there is no flickering on my PC with em_GoToLastFolder.

Thus, one cannot generally speak of flickering occurring.
Fla$her
Power Member
Power Member
Posts: 2299
Joined: 2020-01-18, 04:03 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *Fla$her »

tuska wrote: ↑2023-06-11, 09:34 UTC No.
I did not see any reason to do so.

Who marks the contents of a folder beforehand if he wants to get to the last folder? :roll:
This can only be someone who would like to see a new screen setup with em_GoToLastFolder.
But Ctrl+A is counterproductive in this case.
You cling to unimportant details. Testing is not required to correspond to someone's estimates of the usefulness of an action. Who and for what purpose wants to keep the selection is none of our business. It is important that the command works as it is provided by default by similar commands like cm_GoToFirstEntry, cm_GoToLast, etc.

P. S. There can be a lot of variations of the need to save the selection. By moving the cursor to a folder, there may not be a need to open it. We can call F3, Ctrl+Q, Ctrl+Left/Right, ≣ Menu, etc. At the same time, the selection will remain in demand for other tasks.
Overquoting is evil! πŸ‘Ž
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *tuska »

2Fla$her
OK, so it flashes briefly at Ctrl+A and em_GoToLastFolder on my PC too.
Fla$her
Power Member
Power Member
Posts: 2299
Joined: 2020-01-18, 04:03 UTC

Re: Hotkey to jump to the last folder in the active panel

Post by *Fla$her »

2tuska
Thanks for the test.

But since we indirectly touched on the selection, I can show by personal example where it's important to save it: I perform Ctrl+F3, select only folders by Shift+A, go to the last one by Ctrl+End, execute a script for sequentially changing the modification dates of selected folders with a positive or negative increment of a unit of time, so that in the future the frequently used date sorting made navigation easier.
Overquoting is evil! πŸ‘Ž
Post Reply