Symbolic links in Windows (starts from Vista) can be created using mklink command.
Let’s make a button in Total Commander to create a symbolic link from the selected file:
- In a convenient location, for example in Total Commander plug-ins directory c:\TotalCommander\Plugins\ create a batch file mklink.cmd with the following content:
1 |
mklink %2 %1 |
This command creates a symbolic link to the file transferred from the first input parameter and places it in a location from the second input parameter.
- Create a button in Total Commander panel by dragging this file to this panel.
- Right click on this button and select “Edit …”
- In the “Settings” field specify:
1 |
%P%N %T%N |
Save changes.
%P – path to the file under the cursor in active panel
%N – the name of the file under the cursor in active panel
%T – path to the location, open in a second (non-active) panel
As a result by pressing created button a symbolic link to the file under the cursor in the active Total Commander tab will be created in a location of the inactive tab with the same file name.