I want to move all files not start with date of today, my code as below, can I improve it more faster?
today = datetime.datetime.today().strftime('%Y%m%d')
all_files = os.listdir(image_current_path)
for i, image_file in enumerate(all_files):
if not image_file.startswith(today):
image_file = os.path.join(image_current_folder, image_file) # added
shutil.move(image_file, image_old_path)