You have to identify the process that has the file opened.
To identify the processes you can use the
Process Explorer[
^] (press Ctrl+F or open the Find menu, select file handle or DLL, and enter the file name).
If it is your application, just ensure that the files have been closed before deleting them.