AlexandruC
AlexandruC

Reputation: 3637

Recycle Bin items shredding

I'd like to shred the recycle bin data, but I don't know which is the best approach, so it goes: - In windows vista and 7 the files are renamed starting with $R and a bunch of random chars and also a file starting with $I and the same random chars is created, this file contains some info about the file, including it's name. The $Recycler.bin directory also contains a Desktop.ini, I don't know what it does. - In below vista the management of the recycled files is done using hidden INFO2 files, which do the association between random file name and real name.

Now, let's say I want to build an app that can run on both below and above vista systems, what common strategy would you use? My first lead woud be to navigate the namespace, get the absolute path to the Recycler directories ovewrite the data within the files and delete them manually from the Recycler directories. I also need to notify the shell afterwards.

What other approaches would you use?

*Correct me if I'm wrong in the above statements. sources: Here and here

Upvotes: 0

Views: 461

Answers (1)

Tutankhamen
Tutankhamen

Reputation: 3562

How about using IShellFolder interface?

LPITEMIDLIST    pidlRecycleBin    = NULL;
SHGetSpecialFolderLocation (m_hWnd, CSIDL_BITBUCKET, &pidlRecycleBin);
[...]

Upvotes: 2

Related Questions