Re: Substituting multiple strings into a program [message #81085 is a reply to message #81083] |
Wed, 08 August 2012 13:16  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
So you want to read a "control" file containing a list of filenames (or portions of filenames), and then loop over that
filename list reading and displaying the data in each file?
On 08/08/12 15:50, MightyMrFish wrote:
> I believe the topic may be a bit confusing, so I'll try to describe what I wish to do here. You'll have to forgive me
> if I don't use the correct terminology as I'm not exactly skilled in any sort of programming.
>
> What I want to do is get individual strings of text from a file and place them into a program, run that program, and
> then repeat the program with the next string of text in the file. For example, say I have a file titled "DogNames"
> that has a list of names of dogs (Rex, Cherry, Sniffles, Captain Kevin the V, etc.). I have a set of text documents
> with data corresponding to each name. The text documents are titled according to which dog the data is from (data on
> Rex is titled Rex, data from Cherry is titled Cherry, etc.) The data is columns of information. I have a program
> already that calls for the user to input the name of a file to draw data from and what name to give the graph it
> spits out.
>
> I'd like to be able to have the program read a list of names and, since they directly correspond to file names, be
> able to sub in each name into the program I already wrote and spit out a graph with the same name. I can do the
> latter (naming the graphs), but the former is what I'm unsure about. I know what I want to do (read name1, insert
> into program, produce graph, read name2, insert into program, etc...), but don't know what commands to use or even
> the appropriate syntax.
>
> Any advice/help would be greatly appreciated.
|
|
|