How to open Folder Shortcut on Desktop by TC?

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
AnthonyCian
Senior Member
Senior Member
Posts: 265
Joined: 2005-06-16, 01:45 UTC
Location: Thatcher Az. USA

How to open Folder Shortcut on Desktop by TC?

Post by *AnthonyCian »

I have a shortcut on my desktop that opens to a designated folder. When I double click on it, the Windows file manger opens. How do I get Total C to open that folder?

Windows 8.1

Thanks,
AC

User avatar
MVV
Power Member
Power Member
Posts: 8467
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Maybe it is Win8.1 specific because on my Win7 TC opens LNK's folder instead of opening its directory in Explorer in case of LNK pointing to a folder (and it is so in both physical and virtual folders).
Also it is always a way to press Ctrl+Left/Right on LNK to open its folder in left/right panel (but it seems to be working in physical folders only).

User avatar
Stefan2
Power Member
Power Member
Posts: 2787
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Me think the question was

how to open an shortcut link on Desktop into TC

instead of the default WinExplorer.




 

User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

To do without changing the registry, add shortcut to TC exe file inside your "Send to" folder, usually located at C:\Users\user_name\AppData\Roaming\Microsoft\Windows\SendTo\

Right click on the LNK file and send to TC, TC will start and the LNK file is preselected, so you can open it inside TC

If you want to open in current TC instance, change TC shortcut target to
C:\Totalcmd\TOTALCMD64.EXE /O /L="%1"

User avatar
ZoSTeR
Power Member
Power Member
Posts: 920
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You could try TCShell.

User avatar
Stefan2
Power Member
Power Member
Posts: 2787
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Batch: Write-OpenWithTC-ToTheRegistry.cmd

Post by *Stefan2 »

Good Idea, can come in handy sometimes.

Here is my solution:

-Create new TXT file in TC folder.
-Name like Write-OpenWithTC-ToTheRegistry.cmd
-Store below code in that file.
-Execute every time you need to have the current TC path in registry.


Write-OpenWithTC-ToTheRegistry.cmd

Code: Select all


@ECHO OFF
CLS
REM Write-OpenWithTC-ToTheRegistry.cmd
REM 2016-03-01 by Stefan @ http://ghisler.ch/board/viewtopic.php?p=305616#305616
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
ECHO Write "Open in TotalCmd" to the registry to have that command in WinEx context menu.
ECHO.
ECHO Execute this Batch from inside running TC to have the %Commander_Path% var filled out.
ECHO.
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
ECHO.
ECHO Using: %Commander_EXE%
ECHO.
ECHO OK?
ECHO Press Ctrl+C to cancel, or
PAUSE
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
ECHO.
SET TCP=%Commander_EXE:\=\\%
ECHO Used syntax:
ECHO /O use running TC --- /N open new TC --- /T open new Tab
ECHO /S /L use active panel --- /S /R use passiv panel
ECHO /L use left panel  --- /R use right panel
SET TCO=/O /T /S /R
ECHO.
ECHO Preparing command:
ECHO For Folder, Drive and LNKs
ECHO REG add "HKEY_CLASSES_ROOT\Folder\shell\Open Folder in TotalCmd\Command" 
ECHO      /ve /d ""%TCP%" %TCO%=""%%1""" /t REG_SZ
ECHO For Files:
ECHO REG add "HKEY_CLASSES_ROOT\*\shell\Open Parentfolder in TotalCmd\command"
ECHO      /ve /d ""%TCP%" %TCO%=""%%1""" /t REG_SZ
ECHO (Doubled shlashes are mandatory)
ECHO.
ECHO OK to execute?
ECHO Press Ctrl+C to cancel, or
PAUSE
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
ECHO Executing now the above command:
REG add "HKEY_CLASSES_ROOT\Folder\shell\Open Folder in TotalCmd\Command"  /ve /d ""%TCP%" %TCO%=""%%1""" /t REG_SZ
REG add "HKEY_CLASSES_ROOT\*\shell\Open Parentfolder in TotalCmd\command" /ve /d ""%TCP%" %TCO%=""%%1""" /t REG_SZ
ECHO.
ECHO.
ECHO All done!
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
ECHO.
ECHO INFO: To remove that registry entries use this commands:
ECHO REG DELETE "HKEY_CLASSES_ROOT\Folder\shell\Open Folder in TotalCmd" 
ECHO REG DELETE "HKEY_CLASSES_ROOT\*\shell\Open Parentfolder in TotalCmd"
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
ECHO Press any key to end...
PAUSE >NUL



INFO: To remove that registry entries use this commands:
REG DELETE "HKEY_CLASSES_ROOT\Folder\shell\Open Folder in TotalCmd"
REG DELETE "HKEY_CLASSES_ROOT\*\shell\Open Parentfolder in TotalCmd"



 

User avatar
AnthonyCian
Senior Member
Senior Member
Posts: 265
Joined: 2005-06-16, 01:45 UTC
Location: Thatcher Az. USA

Post by *AnthonyCian »

Thanks everyone, I will give these suggestions a try. And yes, the question was meant to open a desktop folder shortcut by double clicking on it, which would then open Total Commander, instead of the Windows FileManager.
AC

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3632
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

AnthonyCian wrote:Thanks everyone, I will give these suggestions a try. And yes, the question was meant to open a desktop folder shortcut by double clicking on it, which would then open Total Commander, instead of the Windows FileManager.
AC
I have set the registry to open TC for all places except Control Panel and This PC (top level). Adjust the pathes and watch the double slashes.

Code: Select all

Windows Registry Editor Version 5.00
 
 [HKEY_CLASSES_ROOT\Drive\shell]
 @="open"
 
 [HKEY_CLASSES_ROOT\Drive\shell\open]
 
 [HKEY_CLASSES_ROOT\Drive\shell\open\command]
 @="c:\\tools\\wincmd\\TOTALCMD64.EXE /O "%1""
 
 [HKEY_CLASSES_ROOT\Directory\shell]
 @="open"
 
 [HKEY_CLASSES_ROOT\Directory\shell\open]
 
 [HKEY_CLASSES_ROOT\Directory\shell\open\command]
 @="c:\\tools\\wincmd\\TOTALCMD64.EXE /O "%1""
 

Post Reply