Help - Search - Members - Calendar
Full Version: Getzipfilecount Messed Up
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official MediaXMenu (MXM) Forum > MXM WIP Beta forum
flattspott
I remember koldfuzion posted something about zips but could recall what it was exactly.

Anyways, the GetZipFileCount function returns an extra count number. Like if the file has 3 files it will say there are 3 files when it should say 2 seeing how it's starting at 0.
BenJeremy
?? Well, isn't that how it SHOULD work?

The function is intended to get the number of entries in the file... like many similar functions in other APIs, it doesn't attempt to match the upper bounds value (due to zero-based indexing), but rather gives you exactly what it describes.
flattspott
Excuse my ignorence then BJ.

So its normal proceedure to Sub the zipcount by 1 before doing anything.
BenJeremy
QUOTE (flattspott @ May 31 2004, 12:04 PM)
Excuse my ignorence then BJ.

So its normal proceedure to Sub the zipcount by 1 before doing anything.

Well, I know it's a pain, but yes, you'd have to sub the number. sad.gif

...and no need to apologize for anything, flattspott! The File Manager stuff is looking great, and just let me know what you need to make things happen.
koldfuzion
i posted that you could get the info. but it doesnt extract.
flattspott
Getting the info and extracting works for me.

My degugging/test:

CODE

Set CurrentPathAndFile $ActualPath$\Test.zip
Set CurrentPath Z:

:UNZIP
OpenZip CurrentZipFile %CurrentPathAndFile%
SetFunc ZipCount GetZipFileCount CurrentZipFile
Sub ZipCount 1
MsgBox "ZipCount is %ZipCount%" 0 300
For I = 0 To %ZipCount%
  GetZipInfo CurrentZipFile %I%
  Set FileName%I% %ZipEntryName%
  MsgBox "File %I% is %FileName{I}%" 0 300
Next
For I = 0 To %ZipCount%
  UnzipFile CurrentZipFile %I% %CurrentPath%\%FileName{I}%
Next
CloseZip CurrentZipFile
MsgBox "File UnZipped" 0 300
// Return


EDIT: Maybe it was fixed since then
[*] Fixed broken UnRar and UnZip support.
flattspott
QUOTE
and just let me know what you need to make things happen.


I just have have a small question about the GetZipFileCount. Is that just for zip files or can it be used on rar files too.
BenJeremy
QUOTE (flattspott @ May 31 2004, 12:27 PM)

I just have have a small question about the GetZipFileCount. Is that just for zip files or can it be used on rar files too.

Well, unfortunately, there's a "GetRarFileCount"

I might play around a bit and see if I can make them interchangeable.
flattspott
QUOTE
Well, unfortunately, there's a "GetRarFileCount"


Oh, I didn't see that in the ActionscriptReadme or the ChangeLog. I figured either rar's didn't have it or they just used the GetZipFileCount. All is good then if that's the case.
koldfuzion
QUOTE
EDIT: Maybe it was fixed since then
[*] Fixed broken UnRar and UnZip support.


how did i miss that? last i knew it was still broken. grrr
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.