Add Link to file with options. Link syntax for trans passing parameter(s).

Hi there!

Is there ANY way to run * .exe with parameters?

How and where can I add a link with parameters inside Scrivener to a file?

I use Version: 2.9.0.40 Beta (845700) 64-bit

I would be very happy for any suggestions or comments.

Thank you!

I’m not aware of any way in which to do this using URI protocols. It’s worth bearing in mind this is a hyperlink you are creating, not a shortcut or command-line argument. A file:// link is passed to the operating system for handling, and it opens the file based on the default handler based on the file extension. In this case it is an .exe so it is executed, but that is a biproduct of how links work, and shouldn’t imply that the field is synonomous with what you get when hitting Win+R.

I haven’t tested it, but you might try creating a proper Shortcut with the arguments set up the way you want, and then drop that into the binder.

Another approach may be to create a .bat wrapper and link to that.

There are many links in the document and each link is a different file (*.gif, *.jpg, *.avi).

All I need is to open a file with one single click in the application I specified (not on the default handler ).

To do this, I wrote a program, but I need to pass to it the file path or file name.

Sorry, I do not understand - what do you mean?

Create a shortcut in Explorer to PotPlayer64.exe, edit its properties, and add the argument to the Target field, as described in this post.

Oh sure. But I decided to make a * .exe file for each link.

For those who are interested - I did this using autoitscript.com and the code is only 1 line:

example 1 (for *.gif file ):

Run (‘С: \ Portable \ PotPlayer.exe “C: \ gifs \ 0001.gif”’)

example 2 (for *.avi file ):

Run (‘С: \ Portable \ PotPlayer.exe “C: \ avi\ 0001.avi”’)

Thank you AmberV so much for such quick answers!