<html><head><base href="x-msg://29/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Ulisses,</div><div><br></div><div>Se for para fazer porcaria, use Shell Script.</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-- <br>Software Engineer<br>Just Another Perl Hacker<br>Daniel Mantovani +5511 8538-9897<br>XOXO</div></span></div></span></span>
</div>
<br><div><div>On May 29, 2012, at 10:14 AM, <<a href="mailto:ulisses@ibiz.com.br">ulisses@ibiz.com.br</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div dir="ltr" class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><div style="font-family: Calibri; color: rgb(0, 0, 0); font-size: 12pt; "><div style="font-style: normal; display: inline; font-family: Calibri; color: rgb(0, 0, 0); font-size: small; font-weight: normal; text-decoration: none; "><div style="font: normal normal normal 10pt/normal tahoma; "><div><font size="3" face="Calibri">jeito ‘dirty’ que funciona em Linux e MS$ |(se vc baixar o unzip for windows na máquina).</font></div><div><font size="3" face="Calibri"></font> </div><div><font size="3" face="Calibri">se vc puder dar um exec no comando unzip, sugiro</font></div><div><font size="3" face="Calibri"></font> </div><div>$cmd = "unzip -o \"$in\" -d $path_temp_zip"; # unzipa $in no subdir temporario, adicao de -o para overwrite sem perguntar nada para usuario</div><div> </div><div><font size="3" face="Calibri">vc pode colocar opções para extrair apenas os arquivos que vc deseja extrair: opções –x -C</font></div><div><font size="3" face="Calibri"></font> </div><div>$cmd_msg = qx/$cmd 2>&1/; # captura STDOUT e STDERR</div><div>$cmd_status = $?; # memoriza status de retorno do unzip</div><div> </div><div>if ($cmd_status) {</div><div>    ($ok, $sev, $msg) = (0,1,"Erro ao executar '$cmd': $cmd_status: $cmd_msg");</div><div>            ....</div><div>} else {</div><div>   navegue por   $path_temp_zip para tratar os arquivos do seu interesse, ja filtrados pelas opções que vc deve adicionar no $cmd unzip acima     </div><div>}</div><div><font size="3" face="Calibri"></font> </div><div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(245, 245, 245); "><div><b>From:</b><span class="Apple-converted-space"> </span><a title="guedes_1000@hotmail.com" href="mailto:guedes_1000@hotmail.com">Aureliano Guedes</a></div><div><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, May 29, 2012 8:19 AM</div><div><b>To:</b><span class="Apple-converted-space"> </span><a title="rio-pm@pm.org" href="mailto:rio-pm@pm.org">Rio PM</a></div><div><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [Rio-pm] Unzip</div></div></div><div> </div></div><div style="font-style: normal; display: inline; font-family: Calibri; color: rgb(0, 0, 0); font-size: small; font-weight: normal; text-decoration: none; "><div dir="ltr">O que tentei fazer foi isso:<br><br><a href="http://pastebin.com/45tHKZur">http://pastebin.com/45tHKZur</a><br><br>Mas ainda não deu certo.<br><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Mon, 28 May 2012 23:08:44 -0300<br>From: ole.ufg@gmail.com<br>To: rio-pm@pm.org<br>Subject: Re: [Rio-pm] Unzip<br><br>Walking through a zipfile, com certeza te providencia o nomes dos arquivos. Afinal,.a extensão não importante, faz parte do nome...<br>0le<br>Send via Android<br><div class="ecxgmail_quote">Em 28/05/2012 22:48, "Aureliano Guedes" <<a href="mailto:guedes_1000@hotmail.com">guedes_1000@hotmail.com</a>> escreveu:<br><blockquote class="ecxgmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; padding-left: 1ex; "><div><div dir="ltr">Ok. Entendo ja li a documentação, inclusive ja pesquisei codigo pronto ja internet. Mas ainda sim não consegui usa-lo, pois especificando a extenção do arquivo fica facil, o output saira com a extenção desejada, mesmo que você coloque *.cmj (casa da mãe joana).<br>Minha duvida é, descompactar 800 arquivos *.zip onde o conteudo pode ser arquivos das mais diversas extenções, as vezes mais de um arquivo, as vezes uma pasta contendo outros arquivos, acontece que sempre sai um arquivo vazio como ja falei.<br><br>Então, como fazer?<br><br><br><br><div><div></div>> From:<span class="Apple-converted-space"> </span><a href="mailto:gabiruh@gmail.com">gabiruh@gmail.com</a><br>> Date: Mon, 28 May 2012 22:33:55 -0300<br>> To:<span class="Apple-converted-space"> </span><a href="mailto:rio-pm@pm.org">rio-pm@pm.org</a><br>> Subject: Re: [Rio-pm] Unzip<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> On May 28, 2012, at 10:18 PM, Aureliano Guedes wrote:<br>><span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>> > Qual seria minh alternativa??<br>><span class="Apple-converted-space"> </span><br>> Ao invés do IO::Uncompress::Unzip? Hmmm.. que tal o IO::Uncompress::Unzip?<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><a href="https://metacpan.org/module/IO::Uncompress::Unzip#Walking-through-a-zip-file" target="_blank">https://metacpan.org/module/IO::Uncompress::Unzip#Walking-through-a-zip-file</a><br>><span class="Apple-converted-space"> </span><br>> :D<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> _______________________________________________<br>> Rio-pm mailing list<br>><span class="Apple-converted-space"> </span><a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>><span class="Apple-converted-space"> </span><a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br></div></div></div><br>_______________________________________________<br>Rio-pm mailing list<br><a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br></blockquote></div><br>_______________________________________________ Rio-pm mailing list Rio-pm@pm.org http://mail.pm.org/mailman/listinfo/rio-pm</div></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "></p><hr>_______________________________________________<br>Rio-pm mailing list<br><a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>http://mail.pm.org/mailman/listinfo/rio-pm</div></div></div>_______________________________________________<br>Rio-pm mailing list<br><a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/rio-pm">http://mail.pm.org/mailman/listinfo/rio-pm</a></div></span></blockquote></div><br></div></body></html>