Have you printed @cmd before running it through system?
If you have done so, you will see that single quotes do not interpolate variables. $forldername appears verbatim in your command.
Most likely, you want to use double quotes instead:
"$foldername/*.log",
In reply to Re^7: 7zip a folder
by Corion
in thread 7zip a folder
by ytjPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |