By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,091 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,091 IT Pros & Developers. It's quick & easy.

Move files/directories to Recycle Bin using standard Python libs

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.