Variables, Data Types & Control Flow - Video Demo - For Each

For Each Activity

ForEach fileName in invoicesArray

should be

ForEach filePath in invoicesArray

Directory.GetFiles() method returns file paths, not file names

@duke.ames
You can use Path.GetFileNameWithoutExtension(filepath) to get the file name from the file path.

1 Like