Re: "paper basket"
- Posted by Jeffrey Fielding <jjprog at earthlink.net> Jun 10, 2002
- 460 views
Juergen Luethje wrote: > >Hello all, > >I'd like to write some routines, that delete files/directories by using >the "paper basket". > >"paper basket" is the English translation of the German name, but is >this really the correct English name? How is this thing called under >Windows, and how under Linux? > >With the correct name, maybe I can find the proper Windows API-function. >Or can anyone please tell me, how to do it? Under windows, the "paper >basket" is a special directory. Maybe I just have to move the files to >this directory? >Can a DOS program, that is running under Windows 95+, also use the >"paper basket"? > >Thanks in advance, and best regards, > Juergen > > > Under Windows, I think you can use SHFileOperation. I haven't tried it, but from the documentation it looks promising. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/reference/functions/shfileoperation.asp for more information. I don't think it would work for a DOS program, however. Under Linux, there isn't a standard "Recycle Bin." Some window managers, such as GNOME (www.gnome.org) and KDE (www.kde.org) do have something like it, but I haven't tried using it in any of my programs. Jeff