To force delete a file that is currently being used, enter the DEL /F file name command in the command window.   The file name in the aforementioned command must be changed to the name of the file you wish to delete along with its extension. Deleting the contents of a file with the command del /f TestFile.