When I try to delete a file occurs the following exception:
The process cannot access the file \'\' because it is being used by another process.<
slightly off topic: But it seems from your code that you are trying to delete all files of your folder. Well instead of deleting them one by one we have another method Directory.Delete(path, True) which will delete the directory as contained in the string named path. Then you may recreate the directory if you want. But your problem may persist here too.