Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Using SHFileOperation

Reply
Thread Tools

Using SHFileOperation

 
 
avishay
Guest
Posts: n/a
 
      07-20-2005
Hi All,
I want to use SHFileOperation using Python and Win32 extentions, in
order to move a file to the trash can. The function itself can be
accessed by importing win32com.shell.shell. However, I cannot find
anywhere the SHFILEOPSTRUCT. This structure is mentioned in the
documentation of the Win32 extentions, but I can't find a way to access
it.
I would appreciate your help. If there's an alternative way to send a
file to the trash can, that can also help.

Best Regards
Avishay

 
Reply With Quote
 
 
 
 
Roger Upole
Guest
Posts: n/a
 
      07-20-2005
SHFILEOPSTRUCT is just a tuple, with the elements
listed in docs.

from win32com.shell import shell, shellcon
shell.SHFileOperation((0, shellcon.FO_DELETE, 'somefilename', None, shellcon.FOF_ALLOWUNDO|shellcon.FOF_NOCONFIRMATION ))

hth
Roger

"avishay" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
> Hi All,
> I want to use SHFileOperation using Python and Win32 extentions, in
> order to move a file to the trash can. The function itself can be
> accessed by importing win32com.shell.shell. However, I cannot find
> anywhere the SHFILEOPSTRUCT. This structure is mentioned in the
> documentation of the Win32 extentions, but I can't find a way to access
> it.
> I would appreciate your help. If there's an alternative way to send a
> file to the trash can, that can also help.
>
> Best Regards
> Avishay
>




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
 
 
 
avishay
Guest
Posts: n/a
 
      07-21-2005
Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SHFileOperation Help David S. C++ 1 04-04-2006 12:22 PM
Error page using the Application_Error void dosnt work when using DIV for a please wait message s_erez@hotmail.com ASP .Net 2 12-24-2004 12:11 PM
no code in webform using vs.net, but in webform using notepad timmso ASP .Net 1 12-12-2003 04:30 PM
Using GetOleDbSchemaTable to get SQL Server Field Description - using pete ASP .Net 1 08-29-2003 10:50 AM
Re: MVP? Index error on nested element using System.xml but NOT using msxml??? William F. Robertson, Jr. ASP .Net 1 06-25-2003 08:08 PM



Advertisments