Hi Ken, Thank you for replying. The code is right. To make it more clear, let me give you more details on data. The input file looks like this

þBEGDOCþþENDDOCþ þHJH1411255þþHJH1411255þ þHJH1411256þþHJH1411256þ þHJH1411257þþHJH1411257þ þHJH1411258þþHJH1411258þ þHJH1411259þþHJH1411260þ þHJH1411261þþHJH1411262þ
and output from the above script looks like this
þHJH1411255,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\I +MAGES\HJH1411255.tif,Y,,,1 þHJH1411256,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\I +MAGES\HJH1411256.tif,Y,,,1 þHJH1411257,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\I +MAGES\HJH1411257.tif,Y,,,1 þHJH1411258,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\I +MAGES\HJH1411258.tif,Y,,,1 þHJH1411259,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\I +MAGES\HJH1411259.tif,Y,,,2 þHJH1411260,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\I +MAGES\HJH1411260.tif,,,,
The problem is after IMAGES i should get the subfolders also. like HJH1411260,NAME,\\SHARE\OUTPUT3\HOST\CLIENT\NAME\AFT-053348\VOL_006\IMAGES\001\HJH1411260.tif,,,, I have just 1 level folder structure after IMAGES folder. Now the point is based on the input file and the image path the script has to output complete image path till the file name. Let me know if you have questions or need clarifications.


In reply to Re^2: Traverse directory backwards based on file by subhash1198
in thread Traverse directory backwards based on file by subhash1198

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.