This question is about how to get the actual filename out of the variable:
I am currently looking to upload files that start with the same thing regardless of how they end to a private email server. The access to the server works great, the upload works great if I have the exact file name, but then I might as well just do it myself.
Here’s what I need, I need to get the list of files in a location then pattern match the name and if the pattern matches then store the name into a variable for later use. Because of how the private email server is setup I can only attach one file at a time. I need to be able to type the file name into a filename bar.
The issue I’m running into is I’m not sure how to use the directory.GetFiles(“filepath”) to obtain a string or array of strings. I tried using a for each and it can’t convert from object to string, I tried simply assigning a variable with variable type System.String but when that is pushed out to a message box it just outputs “System.String” instead of the data I want. Upon further research I tried changing the typeargument in the for each activity to string using directory.GetFiles(“filepath”) in my in statement and then using an assign activity to add it to a variable then afterwards used a message box to show what was there…the message box was blank.
Unfortunately I cannot attach screenshots or the xaml file. I did my best to explain what I’ve tried and what I need.