我想移動所有不以今天開始的文件,我的代碼如下,我可以更快地改進它嗎?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)
添加回答
舉報
0/150
提交
取消