A mi se me ocurre una solución. Primero pon el nombre del fichero en una variable (strNombreFichero) y haces un bulce comprobando los caracteres de la siguierte forma:
Código Delphi
[-]
for intH := 1 to length(strNombreFichero) do
begin
if strNombreFichero[intH] >= '0' and strNombreFichero[intH] <= '9' strAux := strAux + strNombreFichero[intH]
else
begin
if strAux <> '' then
begin
strAux := ''; end;
end;
end;