in reply to To read files from two dir
Reorganizing the code that way can be a lot of work, but it'll generally be worth the effort.
Apart from that... Do you still have the original version of the script, which presumably worked at some point in the past (and would work again if the directories and files were set up they way they used to be)? If so, check the differences between that original version and the modified version that causes the errors. The problem might be something simple, like adding declarations for variables that are being reported as not declared.
It won't do you much good to post thousands of lines of messy old code here, so don't do that. See if you can work out for yourself what the original script was doing -- write this out as a sequence of fairly simple step-by-step sentences. Then work out how that differs from what the new version needs to do. Figure out the lines of code that handle each sentence/step, and arrange each set of lines so that you can treat it as a subroutine. (Did the original script use subroutines? Do those make sense to you?)
Once you have an organized relation between the steps and the groups of lines that implement those steps, you'll be able to focus attention on one relatively small chunk at a time, and if you still need help, it'll be easier to show us just the part that's causing trouble. Good luck.
|
|---|