For the record: you can find out what's the damn process that's locking a file using something like
TaskInfo.
I've found that many times explorer.exe is the culprit
Sometimes deleting a video file can be a pain in the ass, seems like explorer makes the preview and blocks it (I don't know why, there's no need to lock it for the preview), and then I have to kill explorer.exe, delete the file from cmd and start explorer again...