Recover overwritten file

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
twh
New Cone
New Cone
Posts: 1
Joined: 22 Jun 2020 14:33

Recover overwritten file

Postby twh » 22 Jun 2020 16:17

Hello,

I was trying to convert a file from mkv to mp4 - I overwrote the file using the conversion tool in VLC but it wiped the file. There was a file left but was only about 190kb and was unplayable. Is there anyway to undo this action or recover the old file?

unidan
Developer
Developer
Posts: 1485
Joined: 25 Mar 2018 01:00

Re: Recover overwritten file

Postby unidan » 22 Jun 2020 16:37

Hi, unfortunately there is no way to recover an overwritten file.

Lotesdelere
Cone Master
Cone Master
Posts: 9450
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Recover overwritten file

Postby Lotesdelere » 23 Jun 2020 11:06

There are tools for data recovering but none of them is perfect, and the most important is not to use the drive where the lost file is located before trying to recover it.
There are some free tools like TestDisk and Recuva, among other ones. Good luck.

davexnet
Blank Cone
Blank Cone
Posts: 32
Joined: 11 Nov 2008 05:45

Re: Recover overwritten file

Postby davexnet » 25 Aug 2020 20:34

Surely, under no circumstances, should VLC write to a file it also has open for INPUT.

Can this safeguard be added? It's a bad user error but it's also sloppy programming in VLC

Rémi Denis-Courmont
Developer
Developer
Posts: 14998
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Recover overwritten file

Postby Rémi Denis-Courmont » 25 Aug 2020 22:34

No way. It's perfectly valid to write a file and read it at the same time.

VLC asks before overwriting a file already.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

davexnet
Blank Cone
Blank Cone
Posts: 32
Joined: 11 Nov 2008 05:45

Re: Recover overwritten file

Postby davexnet » 26 Aug 2020 20:22

No way. It's perfectly valid to write a file and read it at the same time.

VLC asks before overwriting a file already.
I tried the scenario myself and it always fails; the file is destroyed.

Under what situation/scenario is writing to a file on the HDD that is already open for input
used in VLC ? Is there a valid case?

Rémi Denis-Courmont
Developer
Developer
Posts: 14998
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Recover overwritten file

Postby Rémi Denis-Courmont » 26 Aug 2020 21:39

When you are recording and playing the recording at the same time.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

davexnet
Blank Cone
Blank Cone
Posts: 32
Joined: 11 Nov 2008 05:45

Re: Recover overwritten file

Postby davexnet » 27 Aug 2020 00:26

When you are recording and playing the recording at the same time.
OK. But this error occurred in the Media/convert-save routine.
Can't you add a safeguard somewhere in there and absolutely
not overwrite the input file no matter how foolish the user?

Rémi Denis-Courmont
Developer
Developer
Posts: 14998
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Recover overwritten file

Postby Rémi Denis-Courmont » 27 Aug 2020 18:08

Did I mention that VLC already asks before overwriting a file? Oh yes.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

davexnet
Blank Cone
Blank Cone
Posts: 32
Joined: 11 Nov 2008 05:45

Re: Recover overwritten file

Postby davexnet » 27 Aug 2020 18:51

Did I mention that VLC already asks before overwriting a file? Oh yes.
Yet somehow the occasional user, for whatever reason, still manages to overwrite the file
because they were inexperienced, got flustered or didn't know what they were doing.

Users occasionally make mistakes. You're just defending VLC's sloppy code.
There is no way the input file should be overwritten in this scenario

I used to be a programmer; if there is a hole, users will find it.
Have you forgotten that?

Rémi Denis-Courmont
Developer
Developer
Posts: 14998
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Recover overwritten file

Postby Rémi Denis-Courmont » 27 Aug 2020 19:02

I'm not interested in your trolling. kthxbye.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

davexnet
Blank Cone
Blank Cone
Posts: 32
Joined: 11 Nov 2008 05:45

Re: Recover overwritten file

Postby davexnet » 28 Aug 2020 20:48

I'm not interested in your trolling. kthxbye.
Fair enough. I guess my idea of defensive programming is different from yours

user1562278798400
New Cone
New Cone
Posts: 2
Joined: 17 Feb 2021 06:19

Re: Recover overwritten file

Postby user1562278798400 » 17 Feb 2021 06:25

The default write name is the original file name. WTF does VLC default the write file name as the read file name? is there any way to recover the original 4gb of data that was erased and replaced with a 160kb file? all i tried to do was downscale the video. i entered a new file name. then i restarted the process and it overwrote part of the original file, which now does not display.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 10 guests