Anyone know how you empty the recycle bin in Java under Vista?
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
kcwong - 30 May 2007 11:00 GMT
> Anyone know how you empty the recycle bin in Java under Vista?
JNI? I found some code in VB which clears the recycle bin
programmatically... but those are quite old, uses undocumented
features, and requires ActiveDesktop to be installed.
But even if those works, you still need to handle the new security in
Vista. Deleting items with some attributes require the program to
elevate.
Stefan Ram - 30 May 2007 13:06 GMT
>Anyone know how you empty the recycle bin in Java under Vista?
See also:
http://groups.msn.com/windowsscript/wshgeneralquestions.msnw?row=16&viewtype=2
Even using wsh, this is difficult, because the actual verb
("&Papierkorb leeren", "&Delete") is localized and even under
Windows 98 it might enforce user confirmation.
JT - 31 May 2007 02:49 GMT
> Anyone know how you empty the recycle bin in Java under Vista?
> --
>
> Roedy Green Canadian Mind Products
> The Java Glossary
> http://mindprod.com
If you are running Vista, could you not put a *nix shell like Interix on
it and run your Java programs on that layer. From there, it should be
easy to execute a ksh command like "rm -f /dev/fs/C/..../recyclebin"