Linux – VLC: How to delete file on disk

linux-mintvlc-media-player

I download videos from Youtube to watch later. I use VLC to watch the videos and when I am done watching a video I would like to remove the file on disk directly from VLC.

I have found several guides on how to implement this, but none of them work for me:

https://forum.videolan.org/viewtopic.php?f=29&t=108811
https://forum.videolan.org/viewtopic.php?f=29&t=113813
http://addons.videolan.org/CONTENT/content-files/153041-Diskdelete.lua

If I follow those nothing happens: No buttons and if there is a keyboard shortcut I am not being told.

So how do I get a button/keyboard shortcut in VLC to delete the video file currently playing from disk?

I use VLC 2.0.8 on GNU/Linux Mint.

Best Answer

So put the file in ~/.local/share/vlc/lua/extensions. I call it DeleteFile.lua.

When you start VLC you get a new menu item: View > Detetefile. It is this last step I was missing.

Edit 20200306

The code did not work very well. I changed it:

https://gitlab.com/ole.tange/tangetools/-/blob/master/wastebasket/dotlocal/share/vlc/lua/extensions/WasteBasket.lua

It now searches for a dir called .waste in the dir of the file and any (grand*)parent dirs, and moves the file there. So you need to create a dir called .waste.

When you start VLC you get a new menu item: View > Move currently playing file into wastebasket.

Related Question