Solved

Working with ZIP files under Win XP

Posted on 2002-06-23
2
558 Views
Last Modified: 2013-12-03
Hi,

when I do the following:

...
SHFILEINFO shfi;
SHGetFileInfo("c:\file.zip", 0, &shfi, sizeof(SHFILEINFO), SHGFI_ATTRIBUTES);
if(shfi.dwAttributes & SFGAO_FOLDER)
{
 //I am getting here

...

In other words Win XP handles zip files as folders. How one can determine under Win XP if folder is a zip file without disabling XP's zip handler? I tried the following:

if(shfi.dwAttributes & SFGAO_FOLDER && !(shfi.dwAttributes & SFGAO_COMPRESSED)
...

but this does not work.

Any help will be greatly appreciated.
0
Comment
Question by:mnbmnb
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 7102206
What about

if ( FILE_ATTRIBUTE_DIRECTORY & GetFileAttributes ( c:\\file.zip") {
//..
}
0
 

Author Comment

by:mnbmnb
ID: 7102290
Good idea. Works fine, thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now