How get file name from folder using write line activity

Hi all friends,

please tell me how to get file name from folder using write line activity. because using write line activity i am getting error .please find error in attachment for this
Capture

Hi @varun_shinde1

Use For Each Activity

Directory.GetFiles(Environment.CurrentDirectory+"\Contract\")

Use WriteLine Activity Followed by any one of the expression

To Get the Full Pathitem.ToString

To Get only the FileName without ExtensionPath.GetFileNameWithoutExtension(item.ToString)

To Get only FileName With ExtensionPath.GetFileName(item.ToString)

Have a look on the document for reference

Get the Filename with and without extension in UiPath - RPA Learners.

Regards
Gokul

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