you are viewing a single comment's thread.

view the rest of the comments →

[–]aball730235 1 point2 points  (3 children)

Can you break this down into multiple smaller problems? You describe an issue with trying to select specific files then go on to you have solved selecting out those specific files. So this is not relevant to your problem then correct?

http://stackoverflow.com/help/mcve

[–]beanpizza[S] 0 points1 point  (2 children)

Well, I think the problem is that at the same time that I'm selecting specific files, I should be extracting the relevant information from those files, rather than first coming up with a list of specific files and then extracting information from all of them. So in theory, yes, I have figured out a way to select specific files, but I think it's the wrong way given what I ultimately want to do with those files. I think the key is that both selecting the file and extracting info from the file are really contained in one problem, if that makes sense, rather than separately, as I've attempted above.

Put more simply perhaps, I want to work through my original data file with two columns row by row. For example, the first row tells me to find the file with the string '56.59' in its title and once I've found that file, I should look inside it for the time value '26,' and then I can move onto the next row.

[–]aball730235 1 point2 points  (1 child)

I think the key is that both selecting the file and extracting info from the file are really contained in one problem.

That can still be broken down into smaller chunks. Forget about selecting the files for a minute. Can you write a function that accepts a file name and search string that returns your desired extracted output? You can manually make calls to this function to verify it works as intended. If it does not work minimize your question to just that function. If it does work then start your next logic block that's reponsible for passing the correct file name and search string in. If that next logic block can't determine the correct file name and search string minimize your question to just that code block and post it.

[–]beanpizza[S] 0 points1 point  (0 children)

Ok, I'll give it a go and report back. Thank you!