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:  398
View Complete with Replies

RELATED TOPICS OF Perl PROGRAMMING LANGUAGE




Creating an encrypted zipfile on Unix for Windows users

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
VIEWS ON THIS POST

166

Posted on:

Wednesday 17th October 2012
View Replies!

IO::Compress::Gzip creates empty file

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.
VIEWS ON THIS POST

128

Posted on:

Saturday 20th October 2012
View Replies!

archive::zip addtree creates zero-length files

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;
VIEWS ON THIS POST

212

Posted on:

Friday 26th October 2012
View Replies!

Finding number of file from gzip'ed format

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 ...
VIEWS ON THIS POST

137

Posted on:

Saturday 10th November 2012
View Replies!

Win32::Process - gunzip and output

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 ...
VIEWS ON THIS POST

209

Posted on:

Monday 19th November 2012
View Replies!

need most efficient way to write this code that checks zips...

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.
VIEWS ON THIS POST

191

Posted on:

Saturday 24th November 2012
View Replies!

zipping large file using Archive::Zip

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 ...
VIEWS ON THIS POST

194

Posted on:

Monday 26th November 2012
View Replies!

dealing with large files in perl

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 ...
VIEWS ON THIS POST

189

Posted on:

Monday 26th November 2012
View Replies!

Re: output from multiple files

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 >> ...
VIEWS ON THIS POST

180

Posted on:

Monday 26th November 2012
View Replies!

LINUX: getOpenFile filetypes

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 ...
VIEWS ON THIS POST

164

Posted on:

Monday 26th November 2012
View Replies!

Noob Q: Ways for module to find config file?

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 ...
VIEWS ON THIS POST

404

Posted on:

Monday 26th November 2012
View Replies!

filling a select box with a list of files

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 ...
VIEWS ON THIS POST

479

Posted on:

Monday 26th November 2012
View Replies!

need help with inherited script that emails files

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 ...
VIEWS ON THIS POST

407

Posted on:

Monday 26th November 2012
View Replies!

Listening for files in a directory

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 ...
VIEWS ON THIS POST

392

Posted on:

Monday 26th November 2012
View Replies!

Parsing a text file into an array

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 ...
VIEWS ON THIS POST

414

Posted on:

Monday 26th November 2012
View Replies!

Removing quote from filenames

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 ...
VIEWS ON THIS POST

411

Posted on:

Monday 26th November 2012
View Replies!

copying multiple files

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 ...
VIEWS ON THIS POST

435

Posted on:

Monday 26th November 2012
View Replies!

Reading the name of a file in a .gz

, 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 ...
VIEWS ON THIS POST

398

Posted on:

Monday 26th November 2012
View Replies!

>$filename") what is the rong with that" style="color:#1385b4;text-transform:uppercase;" name="Post_240728"> open (FAILEHANDLER, ">>$filename") what is the rong with that

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 ...
VIEWS ON THIS POST

210

Posted on:

Monday 26th November 2012
View Replies!

Read a html file, extract email addresses?

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 ...
VIEWS ON THIS POST

389

Posted on:

Monday 26th November 2012
View Replies!