path =[r'C:\Program Files',r'C:\Intel',r'C:\Program Files (x86)']  #provide the folder locations as mentioned format.
File_extension=['.dat','.txt','.log']
days=0 #provide number of days to delete the older files.
import os
import time
import shutil
now = time.time()
for i in path:
    for j in File_extension:
        try:
            for dirpath, dirs, files in os.walk(i):
                try:
                    for k in files:
                         if k.endswith(j):
                            fpath=os.path.join(dirpath,k)
                            if os.stat(fpath).st_mtime < (now - (days * 86400)):
                                print 'path',fpath,' will be removed'
                                if os.path.isfile(fpath):
                                    os.remove(fpath)
                                if os.path.isdir(fpath):
                                    shutil.rmtree(fpath)
                                
               
                except:
                        pass
                        
        except:
                pass
