I personally would use Archive::ZIP
http://cpan.perl.org/authors/id/N/NE/NEDKONZ/Archive-Zip-1.09.readme
The Archive::Zip module allows a Perl program to create, manipulate,
read, and write Zip archive files.
Zip archives can be created, or you can read from existing zip files.
Once created, they can be written to files, streams, or strings.
Hope it helps
UnderMine | [reply] |
Archive::Zip is great, unless you have to deal with password protected Zip files, in which case, it won't work. And if I remember correctly, the author is not going to implement it either because of encryption schemes (can't remember where I saw that though). But, if you don't need to worry about passwords, then it could be quite useful. I'm looking at possibly implementing it for some of our stuff that does not require passwords to extract the file.
"Ex Libris un Peut de Tout"
| [reply] |
I may be wrong, but aren't redmonds OSes case-insensitive? DOS shows anything in uppercase, while the explorer shows only the first character in uppercase? It's been a while since I worked with either one, I just remember that I couldn't fix a case-error over smb, very annoying behaviour IMVHO....
In any case, you may want to look at what ZIP-CPAN has to offer...
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
| [reply] |
The FAT and FAT32 file system are case insensitive. NTFS simulates case insenitivity but can be made (forced is a better word) to be case senitive in useage. This is due to the fact that NTFS was seen by MS as a POSIX (yes IEEE POSIX 1 ) complent file system. NT/2K/XP does not fully use this complience. To Quote MS:
POSIX Compliance
If you want POSIX compliance, you must use NTFS. POSIX compliance permits UNIX programs to be ported to Windows 2000. Windows 2000 is fully compliant with the Institute of Electrical and Electronic Engineers (IEEE) standard 1003.1, which is a standard for file naming and identification.
The following POSIX-compliant features are included in NTFS:
•
Case-sensitive naming. For example, POSIX would interpret README.TXT, Readme.txt, and readme.txt as different files.
•
Hard links. A file can be given more than one name. This allows two different file names, which can be located in different folders, to point to the same data.
•
Additional time stamps. These show when the file was last accessed or modified.
These are microsoft's claims
found here at MS. Unless told other wise the OS will act on information in the NTFS file system as case insenitive but it will display file information in a case senitive way and can be forced to work in a case sensitive manner.
MADuran Who needs a spiffy sig
| [reply] |
NFTS is a very strange beast. The filing system could even have multiple data node in a single file. This is the way it is able to properly serve Mac Files. It actually stores both the data and resouce data.
Interestingly this very feature was exploited in IIS3 as a method of hiding extra data in a file. If I remember correctly adding :$DATA$ on the end of the file accessed the primary data node :$XXX$ accessed the alternate node XXX. Due to its use to hide porn this feature was service packed in IIS.
Without special tools a file would appear 1k long to the OS but would take 10min to copy from disk X to Y. The copy from NTFS to NTFS copied all the data nodes not just the one the OS reported. The secondary node may have been 10Mb but completely hidden and a right pain to find if you were the sysadmin on a shared web hosting site.
Just a bit of digression
UnderMine
| [reply] |
There are other command-line tools, including a command-line add-on to WinZIP available on their web site | [reply] |