Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDX files in zip file

Status
Not open for further replies.

MgtHargreaves

Programmer
May 12, 2006
33
GB
This is not strictly a VFP problem, but does relate to VFP files. I created a zip file which contained DBF, FPT and CDX files using XP's inbuilt routine . This file was then sent to a customer, who unzip'd it again using XP's inbuilt routine. However, non of the CDX files were unzip'd - everything else was.

Any-one got any ideas on this one?

Thank you

Margaret
 
I do not know why, but: the Microsoft licensing doesn't
allow us to use it.
 

Margaret,

When you say the client used "XP's built-in routine", do you mean they did it interactively, for example from within Windows Explorer? Or did they use some sort of programmatic method?

There's nothing special about CDX files as far as zipping or unzipping is concerned. I would suspect the client did something wrong when attempting to unzip. Alternatively, it's possible that their anti-virus utility mistook the CDX files for something potentially dangerous.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Don't why it wouldn't unzip it for you unless they did something wrong. But they should be recreate the .CDX's if they have VFP, or you could write a little routine to recreate them for the user.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Yes, they used Windows Explorer, Mike, and did it interactively - with me on the end of the phone talking them through it. (needless to say, when I did it on my machine at the same time, mine worked perfectly).

We tried both telling it to 'extract all' and also highlighting all the files in the zip file and doing 'copy' and then 'paste' with the same result.

I could recreate them, Dave, but there are 40 CDX's!!! so would prefer to understand why the CDX's did not restore in the first place - we were actually trying to restore a backup of the data to recover from an earlier problem they had created - usually this is done from within our software (using Dynazip), but for various reasons on this occasion it needed to be done outside the software.

I like the idea that the anti virus may have had something to do with it - i will check with them tomorrow.

Thanks for your help guys.

Margaret

 
Margaret,

If these tables are part of a database, you could run GenDBC to generate the code to rebuild the indexes. If they're not, just add your copies to a dbc and run GenDBC.

And, adding them to a dbc is pretty simple - just open up the dbc and then open Windows Explorer, select the dbfs, and drag them to the open database.

Regards,
Jim
 
We have a routine within our software which will recreate the indexes - but since the cdx's are missing the software won't run. However, I don't have a problem recreating the indexes, but I think the issue here is trying to understand why the unzip routine chose not to extract the cdx files, because it then makes a nonsense of having an automated 'restore' routine from within the software.

Margaret
 
I bet even though you talked to them via phone, they just opened the zip folder, double clicked on the dbf and got the error message, that the cdx is missing or corrupt.

zip folders look, work and feel like real folders in many aspects. But if you click on a dbf that opens vfp and it doesn't find the cdx, as that really is not on disk, vfp looks for the dbf in the folder of the zip file, which still is one file and not a folder.

I hate it. It's not really helpful, as it's not fully transparent. This works for dbfs without cdx and ftp, it also works for .doc,.xls and most other single file formats, but not for dbfs.

Bye, Olaf.
 
I pretty sure that is not what happened Olaf, there are 120 files in the zip file - 40 of them are cdx's the rest are dbf and fpt files. We started with an empty folder and after the unzip process the 80 dbf and fpt files were in the folder, but the cdx's weren't.

The customer machine doesn't have development VFP, just a compiled exe.

It is very weird !!

Margaret
 

Margaret,

I wondered if it might be because the files in question were already open -- I mean, the files that the users were unzipping were overwriting existing files, and those existing files were open in your application.

But that's not it. I just tried to simulate that, and I had no problem unzipping all the files.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike

We started with an empty folder, so nothing was being overwritten, and the software was definitely not running.

My only conclusion is that there is some setting on the machine which is causing this to happen. I thought at first that there may be something within the unzip routine which we could change, but I can't find anything.

The antivirus option does sound promising, and it will be my first call in the morning - I will report back.

Margaret


Margaret
 
The mystery deepens!! I have had another customer with exactly the same problem, on a different zip file, which also contains cdx files.

The 2 customers are using different anti-virus software, one Norton and the other McAfee.

To try to get to the bottom of the problem, I sent the 2nd customer a CDX file as an attachment and Outlook Express rejected it.

He turned off his anti virus and all other protection he could turn off in Norton, but the unzip still did not work.

I am waiting for the first customer to ring me back to try some other things.

Margaret
 

Margaret,

If you want to send me a copy of the zip file, I'll see what happens when I try to unzip it. My email address is on my web site (see below).

By the way, are all these users using Windows XP, or what?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike

Yes both users are on Windows XP - I will email you one of the zip files.

I have just had a call from the 2nd customer who has managed to get the cdx's out of the zip file. The key seems to be that the zip file was email'd. He unticked his Tools/Options/security/Do not allow attachments to be saved or opened that could potentially be a virus in his Outlook express ( antivirus was back on at this stage).

Then resaved the attachment, and was able to unzip all the contents. I have tried to recreate the problem but have failed, so I am not sure that is the whole story.

Margaret
 
You will pleased to know that both customers are now back up and running.

In both cases we went into Outlook Express, and unticked the Tools/Options/Security/Do not allow attachments to be saved or opened that could potentially be a virus setting. Then re-saved the zip file from the email and unzip'd it. This time it worked - extracted everything including the cdx's.

So it would appear that the antivirus software is flagging the cdx files inside the zip file as unsafe, and therefore not allowing them to be unzip'd. This must something new within some antivirus software - otherwise I am sure that people would have come across this situation before.

These customers are using Norton and McAfee, we use a different antivirus, and I have not been able to recreate the problem on our machines.

Thank you all for your help and suggestions.

Margaret
 
Hi Margaret,

glad you solved it.

You say Outlook Express? At least the normal Outlook version handles filtering of attachments by itself.

I know prg is among the file extensions, which are considered unsafe.

But normally you can avoid this,by zipping a prg file, cause that has to be actively extracted.

Maybe it would help to not use the XP zip folders, as Outlook may be able to take a look inside, which is not possible with "normal" zip files.

At least you can remove the security on choosen extension by adding a registry key:

Outlook2002:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security

add a new key there, call it "Level1Remove" and as it's value enter semicolon separated extensions, e.g. "prg;cdx"

Ah forget it, before I tell you this for all outlook versions, take a look here:

Regarding Outlook Express you may take a look here:

With Outlook Express 5 and 6 you can configure the safety in Extras/Options/Security. In earlier versions you may copy the mails with blocked attachments to a new folder, then use the import fuction, to import the mails back to the normal inbox and then can access the attachments again.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top