Move files/directories to Recycle Bin using standard Python libs

kyosohma at gmail.com kyosohma at gmail.com
Wed Aug 15 23:05:48 CEST 2007


On Aug 15, 2:55 pm, Kevin D. Smith <Kevin.Sm... at sas.com> wrote:
> On 2007-08-15 13:02:24 -0600, "Chris Mellon" <arka... at gmail.com> said:
>
> > Not easily. The recycle bin is part of the shell, and the shell api
> > calls have very complicated struct parameters that are cumbersome to
> > use correctly from ctypes. If you do the work to map the fileop
> > structs to ctypes you can call the shell API file operation functions
> > in shell32.dll. This assumes that "standard" for you is Python 2.5,
> > which has ctypes. Otherwise you are out of luck.
>
> Unfortunately, I need this to work on Python 2.4 as well...
>
> --
> Kevin D. Smith

As I mentioned in my previous post, you can download ctypes from
sourceforge for 2.4.

Mike




More information about the Python-list mailing list