"Jump To" Deepest New Folder Pathway via F7 New Folder

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
BeRoM
Junior Member
Junior Member
Posts: 15
Joined: 2019-10-25, 14:53 UTC
Location: Texas

"Jump To" Deepest New Folder Pathway via F7 New Folder

Post by *BeRoM »

Hello all! Long time lurker, first time poster here. :D I hope y'all can help me with my issue. I've searched around the forums with Google, and haven't found an answer yet.

I work with a very disciplined file structure, and I am looking for a way to create a New Folder within the structure and be able to "jump to" that folder instantly after creating it with [F7] New Folder.

For example, if I use [F7] New Folder and type "Client_567\Contact_04\Project_1204\Task_002", TC will create 4 folders as normal, but I have to click through each folder to get to the deepest folder that I want... the "Task_002" folder. Sometimes these pathways can exceed 7 folders deep, which means lots of scrolling and clicking throughout the file structure.

Do y'all know of any way to "jump to" the deepest folder in an [F7] New Folder pathway string?

Thank you in advance.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: "Jump To" Deepest New Folder Pathway via F7 New Folder

Post by *ghisler(Author) »

There isn't any internal solution so far. You could copy the folder names with Ctrl+C before creating the folders, then paste the names behind the current path. This could probably be autmated via autohotkey or similar tools.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: "Jump To" Deepest New Folder Pathway via F7 New Folder

Post by *Hacker »

Hello BeRoM,

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
~F7::
	SendMessage, 1074, 17
	WinGetText, PathInTC, ahk_id %ErrorLevel%
	WinGet, TcExe, ProcessPath, ahk_class TTOTAL_CMD
	WinWaitActive, Total Commander ahk_class TCOMBOINPUT
	Hotkey, IfWinActive, Total Commander ahk_class TCOMBOINPUT
	Hotkey, Enter, EnterInF7Pressed, On
Return

EnterInF7Pressed:
	Hotkey, Enter, EnterInF7Pressed, Off
	ControlGetText, NewDir, Edit1, Total Commander ahk_class TCOMBOINPUT
	Send, {Enter}
	WinWaitClose, Total Commander ahk_class TCOMBOINPUT
	Run, % TcExe . " /O /S ""/L=" . SubStr(PathInTC, 1, -3) . "\" . NewDir . """"
Return
This is the shortest AutoHotkey script I could come up with. Works only if you press Enter in the New folder dialog box (i.e. does not work when clicking OK with the mouse).

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
BeRoM
Junior Member
Junior Member
Posts: 15
Joined: 2019-10-25, 14:53 UTC
Location: Texas

Re: "Jump To" Deepest New Folder Pathway via F7 New Folder

Post by *BeRoM »

I figured y'all would recommend AHK... I created a very basic script that seems to work for me so far as it gives me the decision whether to create the folders as normal or to navigate to the deepest folder.

Code: Select all

#IfWinActive, ahk_class TCOMBOINPUT ; Navigates to the deepest folder when creating multiple folders with F7 New Folder
^Enter::
Send {Enter}
Send {Home}
Send {F2}
Send {Right}
Send ^V
Send {Enter}
return
Thank y'all for the input and ideas!
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: "Jump To" Deepest New Folder Pathway via F7 New Folder

Post by *Hacker »

BeRoM,
I have no idea what that script is supposed to be doing but you can write all the keys in one line, like:

Code: Select all

#IfWinActive, ahk_class TCOMBOINPUT ; Navigates to the deepest folder when creating multiple folders with F7 New Folder
^Enter::
Send {Enter}{Home}{F2}{Right}^V{Enter}
return
EDIT: Oh, you have probably remapped F2 to Rename and you have the dir structure in the clipboard already, in that case, yup, that should work.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
BeRoM
Junior Member
Junior Member
Posts: 15
Joined: 2019-10-25, 14:53 UTC
Location: Texas

Re: "Jump To" Deepest New Folder Pathway via F7 New Folder

Post by *BeRoM »

Yes, you are correct, Roman. F2 was remapped to rename (habit from Windows) and the directory structure is copied to clipboard prior to running the hotkey.

Thanks for the tip on combining keys on one line.
Post Reply