in reply to Extracting files from .7z using Perl

Hi, I don't run Windows, but just from general knowledge and the way your program is written, I would suggest the quotations in your extended command line options. For instance, what are the n n 's for?:
system ('C:\Program Files\7-Zip\7z.exe',' e ',$archive,' -r' +,$extdir,$file,' n n') or die $!; # maybe n n should be \n\n ? system ('C:\Program Files\7-Zip\7z.exe', ' e ', $archive,' -r + ,$extdir,$file' , "\n\n\") or die $!;
or the suspicious:
my @files = glob qq($base\\Gridfee0?.7z\\Gridfee?\\invoic_b2c_$year$mo +nth$day*.txt);
Or some other quoting inconsistencies. Your program silently dies. Remember, " and ' are not the same. " interpolates.

Also start printing out your data arrays to make sure they were filled as a debugging aid.

Also, just test extraction first. Can you get your script to do a 7z with the x option on the file? That will ensure it all works, before trying to extract files individually.


I'm not really a human, but I play one on earth. ..... an animated JAPH