Sort files in folder by FileName?

Hi
I have input folder ad Input,β€”D:\Input
Files
vis1.txt
vis2.txt
vis10.txt
vis11.txt
If I get files one by one from the folder

vis1.txt
vis10.txt
vis11.txt
vis2.txt

but
I need in order wise like,
vis1.txt
vis2.txt
vis10.txt
vis11.txt

Thanks in advance
vishnu

Hi @VISHNU07

I think you are trying to sort the files with the Digits which are present in File Name instead of file name. am i correct ?

Regards,
Vijay.

yes @Vijay_Kumar_C

You can add all of the numbers to a list, sort it, then loop through them.
I’ve attached a sample xaml that does just that.

Main.xaml (7.4 KB)

1 Like

Thanks @DanielMitchell