You can use a utility named Unlocker.
EDIT: Unlocker is a windows utility program that will unlock locks placed on a file or a file in a folder, or a folder itself. Once the file or folder is free of the locks the file or folder can be deleted.
Because the program displays the process that has the file or folder locked, it can be useful for discovery.
On the unlocker site they suggest that it can solve:
Cannot delete: It is being used by another person or program.
Cannot delete file: Access is denied.
There has been a sharing violation.
The source or destination file may be in use.
The file is in use by another program or user.
Make sure the disk is not full or write-protected and that the file is not currently in use.