Cannot delete .mkv file

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
pjs
Posts: 14
Joined: Tue Feb 05, 2008 1:25 pm

Cannot delete .mkv file

Post by pjs »

I compressed a de-crypted dvd using H.264 and AC3 passthrough and the mkv container. I read elswhere on this site that the output file plays better if run through mkvmerge to add cues, so I did this. The result worked fine. As I no longer needed the initial mkv file that Handbrake had produced I tried to delete it. I received an error message saying that the file could not be deleted because it was in use by another program. As far as I could see nothing was using the file so I re-booted the pc and tried again to delete the file, but with the same result. Windows task manager said there were no apps running so I started closing processes and eventually managed to send the file to the recycle bin. Even then I could not get rid of it: when I tried to empty the recycle bin I received another error message saying the file was (still) in use. I eventually got rid of it, but only after closing down most of the running processes on my pc. In case this was some isolated bug I repeated the exercise with the same result. This is a really great piece of software, but I don't want to fill up my hard drive with files I can't remove! Any ideas?

Environment: windows
HB Version: 0.9.1
Started with Preset: normal
Then I changed:
Destination file type to mkv
Audio encoder to AC3
Turbo 1st pass unchecked
Architecture: Intel Core2Duo
Computer Info: 2.93GHz, 4Gb RAM, 100Gb HardDrive Space Left
Operating System: XP (SP2)
Intended Player/Device: Windows Media Centre
Intended viewing environment: HD Projector
User avatar
s55
HandBrake Team
Posts: 9969
Joined: Sun Dec 24, 2006 1:05 pm

Re: Cannot delete .mkv file

Post by s55 »

This is nothing to do with HandBrake. Its a windows issue.
pjs
Posts: 14
Joined: Tue Feb 05, 2008 1:25 pm

Re: Cannot delete .mkv file

Post by pjs »

I initially thought the same. However I ran the same test twice and on both occasions Handbrake created an mkv file that Windows could not delete. Also, on both occasions the subsequent mkvmerge file deleted with no problem.
User avatar
s55
HandBrake Team
Posts: 9969
Joined: Sun Dec 24, 2006 1:05 pm

Re: Cannot delete .mkv file

Post by s55 »

You've already ruled handbrake out by rebooting the system. It can't keep a lock on the file if its not open.
pjs
Posts: 14
Joined: Tue Feb 05, 2008 1:25 pm

Re: Cannot delete .mkv file

Post by pjs »

I don't see how any application (including Handbrake) can lock a file immediately following a re-boot. Nonetheless, the mkv file produced by Handbrake shows exactly this behaviour in my system, whilst the mkv file produced by mkvmerge deletes immediately and with no problem. If there is no solution I'll use the mp4 container with AAC instead. I chose mkv because I wanted AC3 passthrough, and I had a different set of (video) problems when I tried AC3 with AVI.
Lant
Regular User
Posts: 70
Joined: Wed May 02, 2007 5:33 pm

Re: Cannot delete .mkv file

Post by Lant »

If you want to unlock the file, try using http://ccollomb.free.fr/unlocker/
pjs
Posts: 14
Joined: Tue Feb 05, 2008 1:25 pm

Re: Cannot delete .mkv file

Post by pjs »

Thanks for that. It looks a useful utility - I'll give it a try.
pjs
Posts: 14
Joined: Tue Feb 05, 2008 1:25 pm

Re: Cannot delete .mkv file

Post by pjs »

I have now tried the unlocker utility http://ccollomb.free.fr/unlocker/ and it does solve the problem.
Post Reply