문제

Is there any call which will get the date when the file was sent to recycle bin.

Items object in Shell32 gives the lastmodified date but not when it is sent to recycle bin.

I want to be able to restore files deleted on a particular date.

도움이 되었습니까?

해결책

OK - as usual it is very simple when you know how. I was thinking this would be a property of the file - but it is not - it is a property of the recycle bin.

So once a link to the recycle bin has been got:

var Shl = new Shell();
Folder Recycler = Shl.NameSpace(10); 
FI = Recycler.Items().Item(0);   
string FileName = Recycler.GetDetailsOf(FI, 0); 
string FilePath = Recycler.GetDetailsOf(FI, 1); 
string RecyleDate = Recycler.GetDetailsOf(FI, 2); 

The lastmodified date is a separate property that refers solely to the deleted file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top