Readin Line From Multiple Files

(imported topic written by Steve91)

Hi All

I’m having trouble with some relevance.

I’ve got the same filename in more than one location on a PC, let’s say the filename is “test.flg”

It is created in the Local Settings folder of whomever logs onto the PC.

I want to retrieve line 1 of the information in all those files on a PC but my relevance get’s stuck because there is more than just one file.

if (exists files “test.flg” of folders “Local Settings” of folders of folder “C:\Documents and Settings”) then ((preceding text of first “,” of line 1 of files “test.flg” of folders “Local Settings” of folders of folder “C:\Documents and Settings”)) else “N/A”

This works fine if I only have one “test.flg” file but if there are others I get the “non-unique object error”

Could you advise some relevance to get around this? I have tried myself but have been unable to resolve it yet.

I’d also be looking to concatenate the results.

Cheers

Steve

(imported comment written by SystemAdmin)

Hey Steve,

I think you just need to add some pluralization to your relevance.

if (exists files “test.flg” of folders “Local Settings” of folders of folder “C:\Documents and Settings”) then ((preceding textS of firstS “,” of lineS 1 of files “test.flg” of folders “Local Settings” of folders of folder “C:\Documents and Settings”)) else “N/A”

Try that and see if it works.

Tyler

(imported comment written by Steve91)

Perfect!

Thanks Tyler