Solved

Working with ZIP files under Win XP

Posted on 2002-06-23
2
572 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

724 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