Ordering and Renaming files by a certain criteria ? : So I have a lot of files (hundreds of them) in a folder, and I like to order them and rename them with an automated process. 
the names of those files are in a form similar to this : " Learning Java 46578.avi " and " learning python 46579.avi" and so on, the numbers on the end of each file name are successive. 
So my problem is I cant order the files alphabetically because each one starts with a different letter. What I want is to write a script that checks automatically the number at the end of the file name and order the files accordingly and/or place those number in the beginning of all file names so they can be ordered Alphabetically 

I hope that my question is good

Thank you 