You can also use the windows api for that purpose. This is however a more costly approach. The function you need to call is SHFileOperation. You can find the ms documenation about the function here:

http://msdn.microsoft.com/en-us/library/bb762164(v=vs.85).aspx

Be careful. file_delete is much safer than using the windows api. If you use SHFileOperation there are pretty good chances the file operation cannot be inverted.


Always learn from history, to be sure you make the same mistakes again...