Adding pathways into a list - invoke method error


Please see above, Im trying to add these items into a list, is there a better way?

error message:

Thanks, Alex.

@aquinn
Can you explain what are you trying to do.

Add a group of file paths into a list, to then add as a mailmessage into an outlook email - I have managed to get the list working now I just need to be able to send it through here:

image

@aquinn your listVar is type of object. It should be String type…can you show us variable type from variable panel

@aquinn If you put NewList variable. is it giving same error?

No but it does not let me store anything in newlist

Am I able to store list2 in Newlist some how?

@aquinn

You can directly use directory.GetFiles("Yourpath").ToList

Cheers

Even though I need to attach say 5 files?

@aquinn

.Tolist will convert the output to list of string…how many ever you get as output from directory.getfiles…

Are you doing any more filters in the loop again…? I dont think so

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.