Putting the elements of a file path into an Array

Hi All,

I am using UiPath to

Get all files from a root folder into an array - Directory.GetFiles(Str_RootPath,“*”,searchOption.AllDirectories)

I then want to loop through each item of the array and split it based on the folder “/”, however my write lines are always blank.

Am I using split incorrectly?

ensure that the typeArgument from the for each actovoty is set to String
give a try on doing split with following statement: item.Split("\"c)

Thanks, seems to execute, but when I write any split item SplitPath(2) I don’t get any output, it just loops

ensure following:
item.Split("\"c) or as an alternate
item.Split({"\"}, StringSplitOptions.RemoveEmptyEntries)

sometimes in the posts the editor lose some chars
otherwise debug it and inspect the string and its split result

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