Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Traverse directory backwards based on file

by kcott (Archbishop)
on Mar 30, 2014 at 12:56 UTC ( [id://1080282]=note: print w/replies, xml ) Need Help??


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

"Let me know if you have questions or need clarifications."

Well, I've already done that but you haven't responded yet.

I asked you to try some print statements; I even provided sample code. Did you do this? What was the result?

I asked about which variable was supposed to hold 001. You haven't told us.

[Separate issue.] Your output is dependent on user input. You don't show what that user input is.

"and output from the above script looks like this"

No, that's not possible! Look at this line:

print OUT $pref . $number . "," . $prodvolumename . ",$tiffpath\\$pref +$number.tif,";

How can this concatenation

$pref . $number

produce

þHJH1411255

when the same concatenation (albeit coded slightly differently)

$pref$number

produces

HJH1411255

Where did that thorn character come from in the first instance; or, conversely, how did it disappear in the second instance?

Either that's not the output you're getting or you're running different code to what you posted.

All I can do now is make guesses! Maybe the user isn't including 001 when entering $tiffpath. Maybe your code doesn't generate 001 for the output. Maybe something else.

-- Ken

Replies are listed 'Best First'.
Re^4: Traverse directory backwards based on file
by subhash1198 (Initiate) on Mar 30, 2014 at 13:42 UTC

    Hi Ken, I cannot show the input folders or filename here as its a confidential data. Let me frame you the scenario: I have Folder containing IMAGE files in TIF format. They are spread across different subfolders like 001,002,003,004,005...etc . I am giving a path till the parent folder that is IMAGE folder. Then i have a load file containg starting page and ending page numbers as BEGDOC and ENDDOC respectively. These might have a difference of 1 or 2 or 3 or any number of pages. Remember, the IMAGE folder contains files in sequence which matches the file naming convention of load file. The output should be BEGDOC,prodvolume,Imagepath,Y, Here Y reperesents the parent file that is first page. I have shown how the input loadfile looks like previously. Based on that numbers the output should contain BEGDOC in single pages along with the corresponding tif path which matches with the names.

      There's no requirement to divulge confidential information. As a trivial example, you could change this real input and output

      $ perl -E 'say "Eyes Only: $ARGV[0]"' secret_info Eyes Only: secret_info

      to this example input and output

      $ perl -E 'say "Eyes Only: $ARGV[0]"' fred Eyes Only: fred

      I've asked questions which you haven't answered and raised points which you haven't addressed. It's up to you whether you want to help us to help you. I choose not to engage in any more guesswork.

      -- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1080282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found