To find out what program/process is using the folder/files in the folders, get an application called filemon. It is available from www.systernals.com

Then you can kill that process and you should have no problem deleting the folder/file.

I have run into this problem sometimes, but right after I have used that file/folder.

I have found that if you give it a couple of seconds, and refresh your explorer/desktop (wherever you are trying to delete it from) will update the use of the file/folder and let you delete it.