Hi again friends,
I have to files with diffrent names in the end of the filename.
One ends with this name Country.pdf
The other ends with this name CountryCode.pdf
How should i write to check the last part of the filename.
Greetings
Anders
Hi again friends,
I have to files with diffrent names in the end of the filename.
One ends with this name Country.pdf
The other ends with this name CountryCode.pdf
How should i write to check the last part of the filename.
Greetings
Anders
Hi @Anders_Dahl
try this
fileList = Directory.GetFiles(folderPath)
ForEach fileName in fileList
filePathWithoutExtn = Path.GetFileNameWithoutExtension(fileName)
and based on that use path exists activity to do any manipulations
Thanks
Ashwin S
Path.GetFileNameWithoutExtension(fileName)
Instead you can use simple and ready to use âGet file nameâ activity developed by @lakshman.
You need to download âGetFileName.Activitiesâ package using âManage packagesâ in Design Tab. @Anders_Dahl

Output will be of Datatype-String. Below is the screenshot for reference.
Thanks @Fer
![]()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.