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?
ppr
(Peter Preuss)
January 22, 2021, 1:28pm
2
@barryrodick
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
ppr
(Peter Preuss)
January 22, 2021, 1:59pm
4
@barryrodick
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
system
(system)
Closed
January 25, 2021, 2:00pm
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.