How to use "Directory.GetFiles" and "For Each" function to go through invoices

I’m trying to use the Directory.GetFiles function to go through a folder of PDF’s and open them one at a time. The current set up I have just starts the execution and ends the execution in 0 seconds, so I don’t know where the break is… I’ve tried to be more specific with the location of the folder too and it still gives me the same result.

It will not let me upload my .xaml file for reference… Any help is much appreciated.

Welcome @AMP2020

Here is how you can loop through the files in a directory. The full line from the For Each is Directory.GetFiles("C:\Users\Daniel\Downloads"). This will return an array of Strings. You can use a Log Message activity and log the file variable (or item if you kept the default) and then you can see all of the filenames being returned by the loop.

image
image

2 Likes