Do you mean that you want to shellexecute the .xmcd file with the highest number??? Then you I think you need something like this:
$manuf = "Pan"
$Model = "NCR18650D"
$highestvalue = 0
For $i = 0 To 99;I think 99 versions are enough??? If you need more just set another 9 after that, then can you use 900 versions more
If FileExists("\\vette\database\" & $manuf & "\" & $Model & "\configs_check_rev" & $i & ".xmcd") Then;Checks if the file exists and if so, the $highestnumber is set to the $i value
$highestnumber = $i;Set $highestnumber to $i
EndIf
Next
ShellExecute("\\vette\database\" & $manuf & "\" & $Model & "\configs_check_rev" & $highestvalue & ".xmcd", "", "\\vette\database\" & $manuf & "\" & $Model, "open");ShellExecutes the .xmcd with the highest value, by example 34
This should work, I haven't tested, because I don't have that kind of hierarchy of my files.