Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Recover deleted data

I used the following C# code to delete a directory:

Directory.Delete ("C:\TC");

Can I restore the directory C:\TC using any kind of softwares? Can I also restore the sub directories?

share|improve this question
    
This really isn't related to C#. It isn't even programming related –  Rune Grimstad Jun 15 '11 at 9:37
add comment

migrated from stackoverflow.com Jun 15 '11 at 9:38

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Mokubai, Ivo Flipse Jun 15 '11 at 9:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 2 down vote accepted

You could use Recuva: a piece of software from the same people who make Defraggler and CCleaner.


Either that or you could create a duplicate of the directory in a temporary folder, and then only delete the temp directory after the user is 100% sure that's what they want to do.

share|improve this answer
add comment

I am not 100% sure but I think if you delete the files using the proper ShellOperation API call you can then find those files in the bin of Windows, with your code above I guess they are gone forever.

On the other hand if you use any of those third party tools usually called Undelete, you should be able to restore most of them I guess.

share|improve this answer
2  
Whether an undelete tool will help depends a lot on how long ago the deletion was. Undelete tools can only work with data that hasn't been overwritten yet, and the longer it's been, the greater the chance that the deleted file's clusters have been reused. –  cHao Jun 15 '11 at 9:54
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.