in reply to Extracting files from .7z using Perl
or the suspicious: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 some other quoting inconsistencies. Your program silently dies. Remember, " and ' are not the same. " interpolates.my @files = glob qq($base\\Gridfee0?.7z\\Gridfee?\\invoic_b2c_$year$mo +nth$day*.txt);
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.
|
---|