This code will ask you what type of file do you want to rename and it will do it adding a progressive number to them.
import glob import os def rename(type_of_file) mp4 = glob.glob("*." + type_of_file) for v in mp4: os.rename(v, "file" + str(mp4.index(v)) + type_of_file) t = input("Type of file to rename (mp4,txt...) > ") rename(t)