Level 1 - Foundation Training > Lesson 2 - Control Flow Part 2 - Loops (Error message stays)

Hello, Can anyone help me out for my issue?

I followed video explanation (around 8:07), I changed [Variable Type] of Variable[FileList] to [String] from [Generic Value], however I am still blocked by error message of
[Compiler error{s) encountered processing expression “Directory.GetFiles(SelectedFolder)”.
Value of type ‘1-dimensional array of String’ cannot be converted to ‘String’.] shown as blue [!]
on the right top of activity[Assign].

How can I fix it?
On video, original error message caused by original [variable type] of [Generic Value] disappears once it is changed to [String], but in my case it does not work like that…

I am watching Japanese translated video. If this part is different from original English version, just tell me so, I’ll check English version.

Thank you!!

Hi @misamo,

If you are using Directory.GetFiles(SelectedFolder) the variable you assign it to needs to be of the Type Array of [String]. As there can be more than one file in the folder an array is needed.

Not sure if the translation is wrong.

Thank you
it works.
sorry for late reply.
I appreciate.

i tried , but it is not working for me .

The workflow has validation errors. Review and resolve them first.

Compiler error(s) encountered processing expression “filelist”.
Option Strict On disallows implicit conversions from ‘UiPath.Core.GenericValue’ to ‘System.Collections.IEnumerable’.