View Single Post
  #9  
Old 03-13-2010, 12:52 PM
Micke's Avatar
Micke Micke is offline
PA Super User
 
Join Date: Feb 2010
Location: Sweden
Posts: 131
Thanks: 11
Thanked 52 Times in 40 Posts
Old thread I know, but I find the problem described here very interesting.

Quote:
Originally Posted by TBGBe View Post
How do you determine which is the "first file" you want to extract - by name (alphabetically) or by date (created, modified or ... ) or by file size (largest, smallest) or some other way?
Quote:
Originally Posted by Infina View Post
it would be first by name, sorry.
The problem here is that like TBGBe says there are no first file in the archive. Infina, you say that it would be first by name, but the problem is that you don't know which file that will be first in the list, resulting in that the name of the file won't matter if it's always the first file in the file list of the archive.

If the name would be the first name in alphabetical order, then you would have to read the whole file list from the archive and then sort the names in alphabetical order to find the file name that would be the first file in this case.

The next problem is that an archive can have multiple files with same name, but in different folders. If that happens, which file would be the first to extract?

If you always are going to extract the first file that is in the file list of the archive, how do you know that it's the correct file?

Example: first add the file Z-TEXT.txt to Archive Test.zip and then add the file A-TEXT.txt to the same archive.

If I then list the contents of Test.zip the file Z-TEXT.txt will appear first in the list, but how do you know that this is the correct file and not A-TEXT.txt

The functionality you are asking for can be fixed, but not without your definition of "first file".

Kind Regards
Micke
Reply With Quote