In a loop i need to save a xml or excel file and use it after how can i select the good one

Please check this xaml and let me know if it works.
GetExtension.xaml (10.6 KB)