sending a file to the Recycle Bin or Trashcan

jicman cabrera_ at _wrc.xerox.com
Wed Jan 30 21:09:53 PST 2008


Regan Heath Wrote:

> 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

Thanks Regan.

josé


More information about the Digitalmars-d-learn mailing list