How to open Folder Shortcut on Desktop by TC?
Moderators: Hacker, petermad, Stefan2, white
- AnthonyCian
- Senior Member
- Posts: 265
- Joined: 2005-06-16, 01:45 UTC
- Location: Thatcher Az. USA
How to open Folder Shortcut on Desktop by TC?
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
Windows 8.1
Thanks,
AC
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).
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).
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"
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"
Batch: Write-OpenWithTC-ToTheRegistry.cmd
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
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"
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"
- AnthonyCian
- Senior Member
- Posts: 265
- Joined: 2005-06-16, 01:45 UTC
- Location: Thatcher Az. USA
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.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
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""