Hi Inititates -> Saints ,

In the process of development of a tool which recursively goes through all sub folders comparing files against same folder structure files , I ended up having a problem.

Please read the following for much details-

1) I take a folder from the user and mark it as main folder.

2)Assumes there are 2 other folders with same folder structure.

3)Compares the MD5 values of a file in main folder tree with a file in the same position as in main folder from the second and third folder.

4)prints certain values based on a logic developed by me.

Now for the problem -

1) When there exists a zip file in sub folder of main and similar or same zip files exists in sub folders of second and third folder , the result got is wrong because the file is not extracted and MD5 is digested for the zip file.

2)Here i used a zipdiff.exe tool( free tool of course )to finish of the work but that again is not able to do what I wanted it to.

I kindly request you all to look into this if you find it interesting and come out with a solution..

if($temp_var2 ne $temp_var1 and $temp_var3 ne $temp_var2 and $temp_var +2!~/FNF/ and $temp_var3!~/FNF/ and $temp_var3 ne $temp_var1){ if(($file1 eq $file2) =~(/.zip/i)){ system "c:\\zipdiff.exe $file1 $file2> +d:\\zipdiff.tmp"; open (ZDF, "<d:\\zipdiff.tmp"); $zipdiffresult = (<ZDF>); close (ZDF); #DeleteFile ("c:\\bin\\zipdiff.tmp"); if($zipdiffresult!~/different/){ printf LOG"2";$v1=1;} else{printf LOG"5";$v1=1;} } }
Here $temp_var1,$temp_var2,$temp_var3 are the MD5 values of a file with same name existing in main , second and third folders respectively.

$v1 is a flag , which i am setting to find any error.

Thanks a ton in advance , as I believe , there are pearled people here..

Prad


In reply to Zipped problem ! by prad_intel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.