sending a file to the Recycle Bin or Trashcan
Regan Heath
regan at netmail.co.nz
Wed Jan 30 09:07:04 PST 2008
Add these to my last post:
UINT FO_DELETE = 0x0003;
UINT FOF_ALLOWUNDO = 0x0040;
UINT FOF_NOCONFIRMATION = 0x0010;
and use this main:
void main()
{
SHFILEOPSTRUCTA op;
op.wFunc = FO_DELETE;
op.pFrom = toStringz("C:\\test.txt");
op.fFlags = FOF_ALLOWUNDO;
op.fFlags = FOF_ALLOWUNDO + FOF_NOCONFIRMATION;
writefln(SHFileOperationA(&op));
}
and it puts "C:\\test.txt" in my receycle bin :)
R
More information about the Digitalmars-d-learn
mailing list