Multi Commander > Support and Feedback

How to create a shortcut?

(1/2) > >>

andrewkirk:
Hello

I have just installed MC on my PC and the portable version on a USB stick and I am trying to create a command that creates a shortcut.

However the Tools > File Links menu option that is in the non-Portable version is not there in the portable version. Is that deliberate*? I sometimes need to work on a PC on which I have a folder to which I have read-write access, but I cannot install programs on the computer. So I was hoping to use MC Portable to organise my folder structure. But shortcuts are a key part of how I make the hierarchy easy to navigate, so I'm hoping that MC portable can still do them.

Since the Create Link menu option was not available in MC portable I tried setting a Custom Command in the portable version to create a link in the same directory, next to the link target (so that the shortcut could then be moved to where it was needed), using

MC.Utils.CreateLink LNKSRC="${targetpath}${sourcefocusname} -  shortcut"   LNKTRG="${focusfilepath}"   LNKTYPE=4
 
but this did not create any link.

Any help would be greatly appreciated!

Thank you

* I notice that Multi Rename is also not in the menu for the portable version. Is that also deliberate?


AlanJB:
I use only the portable version and I have both
 Extensions -> Multi-Rename and
 Tools -> File Links

AlanJB:
To create your shortcut, try:

@var $FileName = GetSourceFocusPath();
@var $LinkName = $FileName + ".lnk";
MC.Utils.CreateLink LNKSRC="{$LinkName}" LNKTRG="{$FileName}" LNKTYPE=4

andrewkirk:
Thank you Alan for both your posts.

I hope somebody will be able to tell me why my portable version does not have Extensions > Multi-Rename or Tools > File Links

Both my USB (Portable) and my hard drive (non-portable) versions are v6.2, build 2147. I am running Windows 7 on an Intel PC.

I tried your code, first as a Custom Command and later as Multi-Script but it refuses to do anything when I call it by the assigned HotKey Ctrl+Shift+Alt+L. I tried assigning a different HotKey Ctrl+Alt+L but that seemed to pull up some different command for finding files, even though it did not say there was a conflict when I assigned the HotKey.

AlanJB:
Hi Andrew (I assume  ;)).

Sorry - should have said it was a Multi Script (Custom Commands can only be 1-line commands).

Have you tried running it through the Multi Script Debugger (1st entry under the Help menu)?  If not, before you do, make sure Multi Commander has focus on a file you want to create a shortcut for...

If you are suffering from customized keyboard (Hotkey) conflicts, try assigning your Multi Script to an obscure key combination that cannot possibly be assigned already.  Say, Ctrl+Shift+Alt F4, for example.

FWIW, I have a User-Defined menu for testing commands:  I attach the new command to the menu and test it works before I assign a Hotkey to it.

As for your missing menu entries, as a WAG, under Configuration -> Manage Plugins and Extensions, with Extension type: set to "Application Extensions", are "File Utils" and "Multi Rename" both checked?

Navigation

[0] Message Index

[#] Next page

Go to full version