472,110 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

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 4097
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.