Read filename (number only)?

I want to read filename number only.
image

output round1 = 12
output round2 = 34

Please guide me about it.

@fairymemay

First use For Each activity and use Directory.GetFileName(“FolderPath”)

Inside For Each place a Assign activity and write as below
fileName = path.GetFileNameWithoutExtenstion(item.ToString)

Once done Place a message box and write system.Text.RegularExpressions.Regex.Match(fileName,“\d+”).Value

To see the result

Check below for your reference

Hope this may help you

Thanks

1 Like

@fairymemay
Please check this Xaml file, hope it can help you
Regards.


Main.xaml (11.6 KB)

1 Like

@fairymemay - Another Approach…

Directory.GetFiles("YourFolderPath").Select(function(x) system.text.regularexpressions.Regex.Match(new fileinfo(x).Name,"^\d+").Value)
1 Like

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