How to make a link for a directory or file using TC?
Posted: 2009-11-30, 00:30 UTC
I can use mklink.exe for it , is there a handy method to do this in the TC?
Forum - Public Discussion and Support
https://www.ghisler.ch/board/
<wincmd.ini> [Configuration]
AppendLnk=Flag
• Link files (*.lnk) will be created as follows:
¤ 0: file.ext –> file.lnk
¤ 1: file.ext –> file.ext.lnk
mklink.exe? To the best of my knowledge, mklink is an internal command of cmd.exe available on recent Windows versions, i.e Vista and above.I can use mklink.exe for it , is there a handy method to do this in the TC?
Junction CREATE
Command: cmd.exe /c mjunction.cmd -ln
Parameters: %T %S
Junction DELETE
Command: cmd.exe /c mjunction.cmd -d
Parameters: %T %S
Code: Select all
::
:: Command: mjunction.cmd
::
:: Usage1: Select Folders in (Source) Pane; Junctions created in Target Pane.
:: Usage2: Select Folders in (Source) Pane; Junctions deleted
::
@ECHO OFF
CLS
IF "%~1"=="-d" GOTO:DELETE_JUNCTION
:CREATE_JUNCTION
IF "%~3" == "" GOTO:EOF
junction "%~2%~3" "%~3"
SHIFT /3
GOTO:CREATE_JUNCTION
:DELETE_JUNCTION
IF "%~2" == "" GOTO:EOF
junction -d "%~2"
SHIFT /2
GOTO:DELETE_JUNCTION
Yes, I agree. It is time for a proper detection of junctions and use a individual handling, as junctions get used more and more since Vista and now Win7.The current fix is suboptimal as it is inconsistent behaviour whether you drag within a panel or to the other panel.