访问回收站 [英] Accessing the Recycle Bin
本文介绍了访问回收站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想把回收站里的文件当成普通目录一样查看,具体是获取那里的文件列表和每个文件到达回收站的日期.
I would like to examine the files in the recycle bin as if it were a normal directory, specifically get the list of files there and the date each file arrived in the recycle bin.
推荐答案
此代码可以帮助您
this code helps you
'Access the recycle bin folder
Dim SH As New Shell32.Shell
Dim RecycleBin As Shell32.Folder = SH.NameSpace(Shell32.ShellSpecialFolderConstants.ssfBITBUCKET)
Dim SB As New StringBuilder
'Loop through the Recycle Bin and get each Items Name
For Each Item As Shell32.FolderItem In RecycleBin.Items
SB.AppendLine(Item.Name)
Next Item
'Display the list of filenames in a label
Label1.Text = SB.ToString
这篇关于访问回收站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文