As I mentionedmentioned in a comment, using string patterns makes for lot cleaner code. Here's a simple way to do it using StringCases
:
changeFileName = StringCases[#, NumberString ~~ "." ~~ f__ :> f] &;
changeFileName@"1234.name.pdf"
(* {"name.pdf"} *)
If you have a list of file names, map the above onto the list.
You can progressively build upon this for more complicated filename patterns. However, for the requirements in the question, this is adequate.