TransWikia.com

I'd like to play a video with vlc using the 'open with' option

Super User Asked by pioliX000 on November 9, 2021

I’m on Windows 10 and have been using VLC for a long time to play movies/series via url.
Usually, I draw the url to the VLC window and it will play it, but I wanted to make it easier for me to play them and just draw them to a batch file to play the url. I’m having trouble doing that though.

I know the command to play the url is simply

vlc <url>

but as I said I wanted to use the ‘open with’ option to play the url and when I drew in the url it wouldn’t even open. It works perfectly fine when the url is added but I don’t know how to add it to a batch file when using ‘open with’.

2 Answers

You can create a Shortcut to easily pass the URL from your Clipboard to VLC open it, with just one click, or using one Shortcut Key

1. Create one shortcut to PowerShell.exe:

C:WindowsSystem32WindowsPowerShellv1.0powershell.exe

2. Add the following command to PowerShell Shortcut:

 -nop -c "$url=Get-ClipBoard; $vlc=start-Process -FilePath "vlc" -ArgumentList $url,-f,vlc://quit"

3. Copy URL (by Crtl+C) and then the Click on your shortcut or use ShortCut Key if set:


Obs.: 1 If needed, adjust the command for keep VLC open after playing the URL,
just remove auto quit argument: ,vlc://quit

C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -nop -c "$url=Get-ClipBoard; $vlc=start-Process -FilePath "vlc" -ArgumentList $url,-f"

Obs.: 2 Set your Shortcut key to Run, and set to Start* in Minimized windows.

enter image description here

Answered by Io-ol on November 9, 2021

The path of the file dropped on a batch file is returned as a normal %1 argument.

Example :

program.exe "%~1"

Use %* when dropping multiple files:

for %%a in (%*) do echo received [%%a]

Answered by harrymc on November 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP