Move files/directories to Recycle Bin using standard Python libs

Kevin D. Smith Kevin.Smith at
Wed Aug 15 21:55:35 CEST 2007

On 2007-08-15 13:02:24 -0600, "Chris Mellon" <arkanes at> 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

More information about the Python-list mailing list