[solved] Opening directory of the shortcut (.lnk) target

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

[solved] Opening directory of the shortcut (.lnk) target

Post by *sorcar »

Is there a way to open in the opposite pane the directory containing the shortcut (.lnk) of the target file?

E.g. In the one pane I have a shortcut (.lnk file) whose target is: "c:\Users\John\Documents\mydoc.docx"

How can I open in the other pane its directory, i.e. "c:\Users\John\Documents\"

Thanks.
Last edited by sorcar on 2015-07-18, 20:21 UTC, edited 3 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7022
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

CTRL-Left or CTRL-Right
User avatar
Dalai
Power Member
Power Member
Posts: 10035
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Or Ctrl+Up to open it in a new tab on the same side.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

Post by *sorcar »

Sorry, if I could not explain it well. I want to open the working directory, not the file pointed by the shortcut.

My lnk file, say is in "c:\temp\mydoc.lnk" pointing to the file "c:\Users\John\Documents\mydoc.docx".
I would like to open the working directory, ie, "c:\Users\John\Documents\".

The three keystrokes above (plus Ctrl+PgDn) open the file, not the directory.

Regards.
User avatar
Dalai
Power Member
Power Member
Posts: 10035
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

sorcar wrote:Sorry, if I could not explain it well. I want to open the working directory, not the file pointed by the shortcut.

Are you sure you mean the shortcut's working directory? That can be a completely different directory that may have nothing to do with the file the shortcut points to.
The three keystrokes above (plus Ctrl+PgDn) open the file, not the directory.
Yes and no. If the file the shortcut points to can be opened by TC (any type of archive) the file is opened. Just like in this case since .docx fiiles are ZIPs. But I don't think that's a problem. Just go one level up (e.g. Ctrl+PgUp) and you're in the directory of the file the shortcut points to.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7022
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

sorcar wrote:Sorry, if I could not explain it well. I want to open the working directory, not the file pointed by the shortcut.

My lnk file, say is in "c:\temp\mydoc.lnk" pointing to the file "c:\Users\John\Documents\mydoc.docx".
I would like to open the working directory, ie, "c:\Users\John\Documents".

The three keystrokes above (plus Ctrl+PgDn) open the file, not the directory.

Regards.
Add to Wincmd.ini
CtrlArrowOpenArchive=4
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

Post by *sorcar »

Five keyboard combinations have been discussed. Presuming my shortcut is in the left pane:

Ctrl+Right = shows the target file on the left pane
Ctrl+Left = shows the target file in the same (left) pane
Ctrl+Up = same as Ctrl+Left
Ctrl+PgDn = shows the target file in the same pane
Ctrl+PgUp = moves up one level (same as Backspace)

None opens the directory "c:\Users\John\documents\".

I can now Ctrl+Enter [to open the properties dialog box], manually copy the path [quite cumbersome], go to the command line, type cd, paste, and then hit enter to open the target directory. Is there a way with a single key combination?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

sorcar,
When you press Ctrl+Arrow on LNK file, TC goes to target object (opens folder containing object and focuses that object). If this file is an archive or directory, TC enters it instead by default, but you can then press Backspace or Enter (or Ctrl+PgUp as Dalai suggested) and go one level up so you'll see that file focused.

Note that if you don't want to enter archives on Ctrl+Arrow and want just to focus them, you should add configuration parameter mentioned by Horst.Epp.
User avatar
Dalai
Power Member
Power Member
Posts: 10035
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

sorcar wrote:Five keyboard combinations have been discussed.

No, there are only three to open a shortcut's target. Ctrl+PageUp/PageDown have a different meaning/function: go one level up or one level down (enter/exit a directory or achive).
Ctrl+Right = shows the target file on the left pane
Uh, no, the other left ;).
Ctrl+Up = same as Ctrl+Left
Not correct. Ctrl+Up opens the shortcut's target on the same side. So, when the left pane is active, the target is opened on the left side, and when the right pane is active, the shortcut's target is opened on the right side.
None opens the directory "c:\Users\John\documents".
Not quite correct either. Set the option Horst mentioned and you can use Ctrl+Left or Ctrl+Right or Ctrl+Up, and TC won't open the .docx file as archive. But you can also ignore this setting and use Ctrl+Left, Ctrl+Right or Ctrl+Up to open the file as archive and subsequently use Ctrl+PageUp to exit the "archive". Either way, both of them work as described.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

Post by *sorcar »

MVV: Thanks for the clear reply (as usual)
Dalai: Thanks for catching the mistakes. I wish I could be that meticulous.
Both: It behaved exactly as you said in a new installation of TC. But in my old installation Ctrl-Right, Ctrl-left and Ctrl-PgDn it showed "c:\temp\mydoc.lnk\*.*" and did not open the directory in either pane. Some obscure setting or plugin might be causing this. Thanks for explaining the feature that I was looking for some months now.
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

Post by *sorcar »

Further:
I have found the plugin that was causing the odd behavior. After disabling CopyLinkTarget it behaved exactly as you suggested.
Horst.Epp & MVV:
Thanks for bringing up the feature that I did not know and for explaining it.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2sorcar
I have found the plugin that was causing the odd behavior. After disabling CopyLinkTarget it behaved exactly as you suggested.
Well yes - CopyLinkTarget behaved exactly as it should be.
It completely alters the standard behavior :-D
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

Post by *sorcar »

2Lefteous:
CopyLinkTarget behaved exactly as it should be
Yes, it did. I have used CopyLinkTarget for so many years that I completely forgot native action of TC.
Post Reply