FileManager-Actions: is it possible to launch an action in the current directory?

395 Views Asked by At

I want to create a simple action, which would launch MS Visual Code from the Nautilus context menu in the currently opened folder.

The default parameter for working directory (%d - first base directory) makes it close: the App is launched in the parent directory.enter image description here

For example, if I execute the action from the /mnt/sdb1/anaconda3/etc path, MS VisualStudioCode is launched in the parent dir - /mnt/sdb1/anaconda3/.

I looked up the list of available parameters, but wasn't able to find the suitable one. Quite surprisingly for me, %b parameter (first basename) performed this action in the current dir (as I would want it to be performed), but it didn't work for the mounted drive. I cannot understand if this is kind of a bug, or there is a proper way to set up the action I need.

1

There are 1 best solutions below

0
Shulainguis On

Try replacing %d for %f

More information about it on this page.

Hope it helps!