I just wanna ask if there's a possibility to retrieve the contents of a 'dump' file from the recycle bin programatically. The contents that I'm looking for are file attributes like 'Date Last Modified, 'Data created', 'size', etc (without restoring the file itself to the original location to preserve the original attributes found while inside the recycle bin.)
Asked
Active
Viewed 723 times
2 Answers
3
This article should help you. As the guy pointed out in his article there is surely a P/Invoke
solution but he couldn't find it.

Petar Minchev
- 46,889
- 11
- 103
- 119
-
@Petar: good article. do you think the 'Date Modified' is also included? – abramlimpin Apr 17 '10 at 11:06
0
There is a not direct c# solution. P/Invoke calls is one of the way.
The location of Recycle bin and other special folders used frequently by applications can be idenitified by CSIDL(Shell). For recycle bin the enum used is CSIDL_BITBUCKET. A CSIDL is used in conjunction with one of four Shell functions, SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, and SHGetSpecialFolderPath, to retrieve a special folder's path.
The C++ implementaion can be found here: How to programmatically use the Recycle Bin
Some c# samples.

A G
- 21,087
- 11
- 87
- 112