This content has been marked as final. Show 5 replies
find the directory for the Recycle Bin and move the file there?
I thought of that, but I guess I'm dumber than I thought, 'cause I can't find such a folder. I even did searches for recycled, recycle... nothing. WTF am I missing?
Using Google, I found this:
The actual location of the Recycle Bin varies depending on the operating system and filesystem. On the older FAT filesystems (typically Windows 98 and prior), it is located in Drive:\RECYCLED. In the NTFS filesystem (Windows 2000, XP, NT) it can be found in Drive:\RECYCLER, with the exception of Windows Vista which stores it in the Drive:\$Recycle.Bin folder.
I think it may be under the Administrator folder, which I dont' have access to this way.
Wikipedia 'recycle bin' seems to indicate that the location may vary from
OS to OS and from file system to file system.
There are API's for it though.
[http://www.codeproject.com/KB/shell/recyclebin.aspx] explains how to do it programmatically.
You would have to write some JNI/JNA/Runtime.exec() code to bridge between Java and native.
Edit: If you can find a command line utility that you can Runtime.exec(), good for you!
I could not find any, but i did not search too much.
Edit: Found some C++ code for such an utility:[http://msdn.microsoft.com/en-us/magazine/bb985590.aspx]
Edited by: baftos on Aug 4, 2008 4:45 PM