For each File in Folder Get Name

Im making an automtation that gets in to a specific folder and logs out the name of every file in there.
And I have two questions:

  1. I saw a video that used a “For Each File in Folder”. But I cant find that activity in my UI Path. Is there any extention or somthing?

  2. I did this this secuence, any idea of how to get the name of each file in the folder? Is there like a GetName or somthing like that?

image

give a try at
Path.GetFileName(currentItem)
1 Like

Hi @Favarelaa

Please try this

FileName with extension → Path.GetFileName(currentItem.ToString)
FileName without extension → Path.GetFileNameWithoutExtension(currentItem.ToString)

1 Like

Hi @Favarelaa

Make sure you have UiPath.System.Activities installed in your project. If you still can’t find the activity upgrade the package to the latest version and search for the activity.

Hope it helps!!

1 Like

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