in reply to Extracting files from .7z using Perl
Your triple loop over $year,$month,$day is truly bizarre.my $base = 'D:\Some\Specific\Folder\Archive\\'; # should be: my $base = 'D:/Some/Specific/Folder/Archive'; # a path to a directory or my $base = "D:/Some/Specific/Folder/Archive"; # a path to a directory # do not put a trailing '/' or '\' on a directory name # this is not needed and can confuse the shell # pre-pend a '/' when you expand the path my $new = "$base/$extra_path";
What are you trying to do there? I don't quite "get it".my @files = glob qq($base\\Gridfee0?.7z\\Gridfee?\\invoic_ +b2c_$year$month$day*.txt);
I am curious as to why you are using .7z suffixes? I like 7z. It generates .zip files faster which use less memory than the MS zip program does. These .zip files generated by 7z are compatible with Windows .zip. I've never used the .7z specific format because the .zip MS compatible format appears to be just fine for my applications. Again, if 7z makes that .zip it will be smaller than what MS does, be generated faster and yet be compatible with MS .zip.
|
---|