Option to directly delete file from harddrive

Feature requests for VLC.

Would you like an option for permanently file deletion?

Yes
23
79%
No
4
14%
I don't care
2
7%
 
Total votes: 29

sector
New Cone
New Cone
Posts: 9
Joined: 23 Feb 2012 20:16

Re: Option to directly delete file from harddrive

Postby sector » 22 Mar 2012 13:57

Ok then how do we get this code developed? it's been 6 years and there has been no movment. ?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Option to directly delete file from harddrive

Postby VLC_help » 22 Mar 2012 18:13

Hire someone to do it. It is quite easy to add one button to QT4 GUI and force to remove file
http://qt-project.org/doc/qt-4.8/qfile.html#remove

but it is somewhat difficult to make it work in such way that nobody will complain.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Option to directly delete file from harddrive

Postby Jean-Baptiste Kempf » 31 Jul 2012 15:59

here, let me help you, I wrote an extension for VLC that will delete the current file from disk:
http://addons.videolan.org/content/show ... ent=153041

edit: also available on github: https://github.com/VanNostrand/Diskdelete
Nice!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

carnitastaco
New Cone
New Cone
Posts: 1
Joined: 06 Feb 2013 07:47

Re: Option to directly delete file from harddrive

Postby carnitastaco » 06 Feb 2013 08:02

hey guys, I'd been keeping an eye on this for a while, but missed this diskdelete link. Once I tracked the code down, it didn't work on windows 7, but I actually got it working by changing the filename length and making the program skip to the next file and wait a little bit before trying to delete. I don't know anything about programming so I'm sure there are more or better ways to do this, I just messed around with it a bunch until it worked.

Here's what I used, just save as a .lua and copy to lua extensions folder, then select disk delete from the view menu

--[[
INSTALLATION (create directories if they don't exist):
- put the file in the VLC subdir /lua/extensions, by default:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\VLC\lua\extensions\
* Linux (all users): /usr/share/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
- Restart VLC.
]]--

--[[ Extension description ]]

function descriptor()
return { title = "Diskdelete" ;
version = "0.2" ;
author = "Mark Morschhäuser" ;
shortdesc = "DELETE current playing FILE FROM DISK";
description = "<h1>Diskdelete</h1>"
.. "When you're playing a file, use Diskdelete to "
.. "easily delete this file <b>from your disk</b> with one click."
.. "<br>This will NOT change your playlist, it will <b>ERASE the file</b> itself!"
.. "<br>It will not use the Recycle Bin, the file will be gone immediately!"
.. "<br>This extension has been tested on GNU Linux with VLC 2.0.3."
.. "<br>The author is not responsible for damage caused by this extension.";
url = "https://github.com/VanNostrand/Diskdelete"
}
end

--[[ Hooks ]]

-- Activation hook
function activate()
vlc.msg.dbg("[Diskdelete] Activated")
d = vlc.dialog("Diskdelete")
d:add_label("<b>Clicking</b> this button will <b>delete</b> the currently playing file <b>from disk</b>.<br>You have to <b>be sure</b> as <b>you won't be asked</b> again!<br>You are responsible for your own actions, consider yourself warned.")
d:add_button("DELETE CURRENT FILE PERMANENTLY FROM DISK WITHOUT ASKING", delete)
d:show()
end

-- Deactivation hook
function deactivate()
vlc.msg.dbg("[Diskdelete] Deactivated")
vlc.deactivate()
end

function close()
deactivate()
end

--[[ The file deletion routine ]]
function delete()
item = vlc.input.item() -- get the current playing file
vlc.playlist.skip(1)
vlc.misc.mwait(vlc.misc.mdate() + 3000000)
uri = item:uri() -- extract it's URI
filename = vlc.strings.decode_uri(uri) -- decode %foo stuff from the URI
filename = string.sub(filename,9) -- remove 'file://' prefix which is 7 chars long
vlc.msg.dbg("[Diskdelete] selected for deletion: " .. filename)

retval, err = os.remove(filename) -- delete the file with this filename from disk
if(retval == nil) -- error handling; if deletion failed, print why
then
vlc.msg.dbg("[Diskdelete] error: " .. err)

end

end

-- This empty function is there, because vlc pested me otherwise
function meta_changed()
end

Stockel1949
New Cone
New Cone
Posts: 1
Joined: 22 Mar 2013 13:07

Re: Option to directly delete file from harddrive

Postby Stockel1949 » 22 Mar 2013 13:14

File script but if it is installed the file don't delete after hitting the button. (Win Vista)

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Option to directly delete file from harddrive

Postby mederi » 22 Mar 2013 14:51

Working solution for Windows users:
viewtopic.php?f=29&t=108811#p368432

yoestiee
New Cone
New Cone
Posts: 5
Joined: 11 Jan 2014 17:17

Re: Option to directly delete file from harddrive

Postby yoestiee » 11 Jan 2014 17:18

In how much time this feature will be coded ? Can't wait for it !!!

mikeofyle
New Cone
New Cone
Posts: 1
Joined: 23 Jan 2014 18:12

Re: Option to directly delete file from harddrive

Postby mikeofyle » 23 Jan 2014 18:17

I love VLC, but there are some important simple features which are conspicuously absent. This one most of all! (I want this feature so hard!)

sl5net
New Cone
New Cone
Posts: 1
Joined: 15 Dec 2014 18:22

Re: Option to directly delete file from harddrive

Postby sl5net » 15 Dec 2014 18:26

hi i created for seconds a little buggy workaround for this problem. works only with OS windows. if you want help / you interested ask me. you need to have little programmings skills. best regards

the AHK script starts like this:

Code: Select all

#IfWinActive VLC media player ahk_class QWidget del:: ControlSend,,^i,VLC media player ahk_class QWidget ...
tip: delete the files later. collect adress in list. and delete lalter.

ruimores
New Cone
New Cone
Posts: 2
Joined: 06 Mar 2015 16:51

Re: Option to directly delete file from harddrive

Postby ruimores » 06 Mar 2015 17:28

i don't know if it is working right :(
RealDelete - http://addons.videolan.org/content/show ... ent=167857


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 19 guests