SEARCH YOUR SOLUTION HERE  

Zip file processing without recompiling PHP

I am trying to create an OsCommerce plugin that parses a number of files and adds them to the catalog. I need some method of transferring the files to be parsed to the server with OsC. Ideally, I would like ...

Posted On: Monday 26th of November 2012 08:56:12 PM Total Views:  362
View Complete with Replies




Related Messages:

Creating an encrypted zipfile on Unix for Windows users   (140 Views)
Hi folks, I'm writing a script that basically creates a bunch of files, packages them up (tar/gz), and mails them out. I can handle all of that, but before I mail them I also have to password protect the archive like pkzip does. I really don't want to shell out to pkzip if I can avoid it. I checked CPAN, of course, but Archive::Zip which seemed the likely candidate doesn't do encryption. Crypt::OpenPGP or similar is also no good since I can't (much as I'ld like to) use public key. I didn't see any others that do what I need, which is create a WinZip compatible encrypted archive which is easily opened by a Windows user with the password which I would provide separately. Any advice/docs/hints would be much appreciated. Thank You! richf
IO::Compress::Gzip creates empty file   (115 Views)
Hi Folks, I have the following code: use IO::Compress::Gzip qw(gzip $GzipError); ....then... gzip "$company.$ext.$date" => "$company.$ext.$date.gz", BinModeIn => 1 or do { warn "Failed to gzip file: $company.$ext.$date: $GzipError\n"; next DOTDONE; }; The file "$company.$ext.$date" is created in the immediately preceding step and definitely contains data, but the resulting compressed file is empty, and the warn statement is not executed. I've extracted and wrapped this code to create a little test program which works fine, that is, the resulting compressed file contains the data I expect. Does anyone know what could possibly be going wrong Same code, 2 different programs. One works the other does not. I'm baffled.
archive::zip addtree creates zero-length files   (198 Views)
I am using archive::zip with ActiveState Perl on Windows, and using addtree to zip up folders. I observe that for each folder it zips, it creates a file of the same name, zero bytes in length, in the archive. If I open the archive in Windows Explorer (using the built in compressed folders feature of Windows) and drag folders out, the extract fails due to the zero length files. Anybody else experienced this Any solution to stop archive::zip from creating these unwanted and problematic files my $zip = Archive::Zip->new(); # Create zip die "Failed to zip $name" # Add contents if $zip->addTree($item, $name) != AZ_OK; #$member->deedCompressionMethod( COMPRESSION_DEFLATED ); die "Failed to write $name.zip file" if $zip->writeToFileNamed("$name.zip") != AZ_OK;
Finding number of file from gzip'ed format   (109 Views)
I am not sure if this is the right group to ask this question - i am sorry if this is not the right place. Problem: Let us say we have file called "myfile.txt". The size of the file ...
Win32::Process - gunzip and output   (195 Views)
There is something I can't understand which is the following. I have a system command which runs a commandline to unzip a file: my $Out = system ( $rootPath."bin/bin/gunzip -dfc ". $SourceFilePath." > ".$rootPath.$DestinationPath.".txt"); This works fine. since I would ...
need most efficient way to write this code that checks zips...   (174 Views)
For comparing the data in the $zipField against all the zip codes in zipFile.txt, I would suggest reading through the text file and storing all the zip codes in a hash with some non-false value (so something other than undef or 0.) The check for a valid zip code would then consist of if (defined $hash{$zipField}).For the $addrField check, you're going to have to be careful. It's possible any house number with 5+ digits could, in theory, match a zip code. Once you sort out the house numbers problem, you could check any zip codes in $addrField against the hash you created from the text file.
zipping large file using Archive::Zip   (175 Views)
I have a 16 GB file that I zipped using perl's Archive::zip module. When I try to unzip this file using WinZip, it shows the "uncompressed size" = 4294967295. Upon trying to extract this file via WinZip, the winzip program ...
dealing with large files in perl   (171 Views)
Good day folks, I'm looking for some help and hoping to get some tips back. here's the situation: i've two large files containing one unique value in each file which is the id however, i have to go through each ...
Re: output from multiple files   (168 Views)
On comp.unix.shell, in , "John W. Krahn" wrote: > > > suraj_c@hotmail.com wrote: >> There are three files called first , second and third . Each is having >> three columns >> >> $cat first >> a b c >> ...
LINUX: getOpenFile filetypes   (151 Views)
Further to my previous post "limiting getOpenFile filetypes" is there anyone running LINUX who can try this script and see if they get a list of ".ps*" and ".eps*", or only ".ps" and ".eps" as the windows seem to ...
Noob Q: Ways for module to find config file?   (371 Views)
What are the techniques for a module to find its config file It's a chicken/egg problem, since the location of the config file is itself a parameter that may (or must) be configured. One technique I can think of is ...
filling a select box with a list of files   (448 Views)
I'm looking for a perl script that can fill a "select" box (combo) from a file listing in a particular directory. Can someone direct me to a script that has already been written, or is this easy to do ...
need help with inherited script that emails files   (378 Views)
This perl script goes through a list of files in IFILE and for each file, it sends it on to sendmail. Attachments need special handling and are signified in the email-file by having a line start with 3@ folowed by ...
Listening for files in a directory   (360 Views)
I'm trying to make a solution that can listen for files in a given directory, and process the files as soon they have been written. So far I'm executing the script once per minute, but I would like a realtime ...
Parsing a text file into an array   (381 Views)
I am new to perl, and have not found any good examples of parsing to help me out. I have a text file that I am reading into an array that has to be parsed out and put into another ...
Removing quote from filenames   (381 Views)
all, Please give me a hand here. I've been banging my head for a couple hours trting to get all of the quotes out of the filenames of a group of files. I can't get the "system" call to ...
copying multiple files   (387 Views)
hello all, How can i copy files with a particular extension. For eg: I am using copy ("$HOME_DIR/file1.txt" ,"$LOCAL_DIR/") or warn "Cannot copy file: $!"; to copy a file, but if i have to copy all the files with the ...
Reading the name of a file in a .gz   (370 Views)
, I need to read the name of a file inside a .gz. I know it should be the zipped name - .gz, but the filenames are long and truncated sometimes. In perl, what is the command to read the ...
>$filename") what is the rong with that" class="" href="http://www.solveerrors.com/forums/17/perl/open-failehandler-filename-what-is-the-rong-with-that-240728" style="color:#333333; font-weight:bold;"> open (FAILEHANDLER, ">>$filename") what is the rong with that   (187 Views)
Dear perl experts, I used to use[ open (FAILEHANDLER, ">>$filename");] to open and add new lines to $filename, but it didn't work any more. The perl version is 5.8.1. When I try [ open (FAILEHANDLER, ">$filename");] it's work but the ...
Read a html file, extract email addresses?   (363 Views)
I have searched without success for a simple script that can read any text html file and extract the email addresses from it. I am not interested in spamming people. I play a sport that requires me to email people ...