I am iterating through a folder with a For Each loop. I want to set the filename of the current file in the iteration to a variable.
folder1 is the path of the directory that will be iterated through.
Hi
Welcome to uipath community
Yah in the assign activity along To property mention a string variable named str_Filepath of type string
And in VALUE property as item.ToString
Cheers @path1
1 Like
In for each
Assign
FilePath=Path.GetFileName(Item.Tostring)
Fow without extension
FilePath=Path.GetFileNameWithoutExtension(Item.Tostring)