469,647 Members | 1,688 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

Move files/directories to Recycle Bin using standard Python libs

I would like to move files and directories to the Recycle Bin on
Windows from Python. I have found some older articles describing how
to do this, but they require additional packages to be installed. I'm
working on a plugin for an existing project and only have the standard
library to work with. Is there a way to use the Recycle Bin using
standard Python?

--
Kevin D. Smith

Aug 15 '07 #1
2 3900
On Aug 15, 11:39 am, Kevin D. Smith <Kevin.Sm...@sas.comwrote:
I would like to move files and directories to the Recycle Bin on
Windows from Python. I have found some older articles describing how
to do this, but they require additional packages to be installed. I'm
working on a plugin for an existing project and only have the standard
library to work with. Is there a way to use the Recycle Bin using
standard Python?

--
Kevin D. Smith
Sounds like a Windows only thing to me, so you'll probably have to use
the win32 package regardless. See the following links:

http://mail.python.org/pipermail/pyt...er/287638.html
http://tgolden.sc.sabren.com/python/...py-a-file.html

Mike

Aug 15 '07 #2
ky******@gmail.com schrieb:
On Aug 15, 11:39 am, Kevin D. Smith <Kevin.Sm...@sas.comwrote:
>I would like to move files and directories to the Recycle Bin on
Windows from Python. I have found some older articles describing how
to do this, but they require additional packages to be installed. I'm
working on a plugin for an existing project and only have the standard
library to work with. Is there a way to use the Recycle Bin using
standard Python?

--
Kevin D. Smith

Sounds like a Windows only thing to me, so you'll probably have to use
the win32 package regardless. See the following links:

http://mail.python.org/pipermail/pyt...er/287638.html
http://tgolden.sc.sabren.com/python/...py-a-file.html
Or access the win32 api directly with ctypes (included in Python 2.5).

Thomas

Aug 15 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by ebobnar | last post: by
3 posts views Thread by Kay Lee | last post: by
6 posts views Thread by Sylvain Thenault | last post: by
5 posts views Thread by KraftDiner | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.