hexagon logo

Script to modify a series of .PRG files

I have a need to automate the following process:

Loop through a set of .PRG files that are in a common directory. For each file do the following:
1) Open the file
2) Locate a specific command in the program
3) Delete all commands in the program after the command located in step 2
4) Add a set of dimension commands after the command identified in step 2
5) Launch the PCD2EXCEL wizard to output a .CSV file containing the data from the commands added in step 4
6) Close the file

Has anyone had to do something similar? Is anyone willing to share their code for any or all of these actions?

Thanks for any help.
Parents
  • Yeah, give me more details and I'll try knock something up for you.

    I love this sort of stuff!

    Do you have excel on the pc? If so what version?

    What's the command in 2) ?

    Add the commands (dimensions) in 4) you want in one program, then export is as .bas - view it in notepad then delete everything above the commands you add. Post it here.

Reply
  • Yeah, give me more details and I'll try knock something up for you.

    I love this sort of stuff!

    Do you have excel on the pc? If so what version?

    What's the command in 2) ?

    Add the commands (dimensions) in 4) you want in one program, then export is as .bas - view it in notepad then delete everything above the commands you add. Post it here.

Children
No Data