Alex Rivera | Logout

How do I restore a file from the recycle bin using C#?

Asked 2009-05-26T15:47:39.763
14

Moving files to the recycle bin and emptying the recycle bin are well documented, but how can a file be programmatically restored from the recycle bin?

Edit
Report

1 Answer

5

There seems not to be a solution in pure C#. You most likely have to resort to P/Invoke. This article presents a solution in C++ using the SHFileOperation API.

answered 2009-05-26T16:01:17.240

Your Answer