How to get current file name

How to read current filename?

Hi @ajkv
From where you are getting? can you be more specific?

Assuming you have file path:

Assign Activity:

FilePath = Directory.GetFiles(“Path”); //Path to the current file.

Another Assign Activity:

FileName = FilePath.Substring(FilePath.LastIndexOf("/")+1);

//Access name using last occurence of ‘/’

Change “/” it to backward slash.

Eg : C:\Desktop\abc.jpg

Will give you the current file name.


You can refer below article to get file name

and i make some sample for you, hope it may help you to do that you want. (12.1 KB)