Get file Name

Hi,
I am selecting an excel file with excel scope activity. how can I store the file name that I am selecting into a variable so that I can use it later?

I want to get the file name into a variable each time I select a file.

Hi @ADITYA_MUKHERJEE

So from the Path you want just the file name right ??

This will give you file name with Extension :-

Path.GetFileName(path)

This will give you file name without Extension :-

Path.GetFileNameWithoutExtension(path)

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Are u using select file for selecting it ?
If yes then output of that activity will store the file path that u have selected.
Or if u just giving path in studio if giving path then u can store it in a variable using assign or can directly assign in variable pane.