fnmatch # define our data files data = [] for dirpath, dirnames, filenames in os.walk('.'): data.extend(os.path.join(dirpath, fn) for fn in filenames if fnmatch(fn, '*.png')) data.extend(glob.glob('*.ttf')) data.extend(glob.glob(‘*.txt')) dest = data_dir for fname in data: dname = os.path.join(dest, fname) if not os.path.exists(os.path.dirname(dname)): os.makedirs(os.path.dirname(dname)) if not os.path.isdir(fname): shutil.copy(fname, dname)