im building a program that delets contents of the recent documents, temp, and temporary internet files

if i do kill "path to recent\*.*" that works just fine, but for temp, if a file is behing used it wont let me, and it says path not foudn when i do temporary internet files path, does anybody know how to delete those? including cookies, or if u know how excluding cookies that would work too?