Check out this method...
My.Computer.FileSystem.DeleteFile
Is has a parameter for optional sending to the Recycle Bin.
Like Joseph, I would have expected this to be in the IO namespace
(specifically System.IO.File.Delete) for for some unfathamable reason, MS
chose to hide this in the My namespace. I can see where MS would want to
aggregate a bunch of commonly-used method from across the entire Framework
into a nice, easy-to-access namespace. So, I personally agree with the
whole My thing. But what I don't get is why they would add functionality
*only* to the My namespace. Fair enough if you want to make it easier on
the people who don't know the Framework, but don't do it in such a way that
it actually makes it harder for people who *do* know the Framework.
OK. I feel better now. :-)
- Mitchell S. Honnert
"johnb41" <js********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I searched and found a way (via API) t0 add a deleted file to the
recycle bin. (Thanks Ken Tucker! :))
But I was wondering if VB.NET 2005 (framework 2.0) has a non-api
solution.
(Note: i think it's crazy that you have to manually add code to add a
file to the recycle bin. You'd think the opposite would be true. i.e.
deleting a file and skipping the recycle bin would need special code.)
Thanks!
John