Actually as we are changing existing code so my seniors asked me to put code like this so i was looking for solution.
I expect that your "senior" has been misunderstood or does not themself understand what is needed. . .
I don know much about his pgm but as a beginner i will look forward to acquire knoweledge of such things as well
Why does knowledge of the program have anything to do with "generation" or "version"? What is to happen when the "next" file is created?
There needs to be a much better understanding of what is happening before something is just thrown in because of needint do to something".