A dry run for your first file automation / 第一次批量整理文件,先做一次预演

← Blog / 博客 · Sunrising dev ·

A dry run for your first file automation

Automation / 自动化

Use a disposable folder

Imagine sorting exported photos into monthly folders. Start with copies of six files, not your whole library. Include two with the same name from different cameras, one without a date and one already in the right place. Decide what should happen to each before writing the rule.

Make the plan visible

Print one row per file: source, proposed destination and action. If two rows point to the same destination, mark both for review instead of letting the later file overwrite the earlier one. A missing date is a reason to skip a file, not a reason to silently give it today’s date.

Run the rule twice

Apply the reviewed plan to the copies. Count the files and open a few at their destinations. Run the preview again: the already sorted files should now show no change. If a second pass creates another layer of monthly folders, fix the rule before touching the originals.

第一次批量整理文件,先做一次预演

Automation / 自动化

从副本开始

想把照片按月份归档?先复制六个样本,不要直接拿整套相册试。刻意放进两张来自不同相机的同名照片、一张没有日期的照片和一张已经归档的照片。先写下每个样本应该得到什么结果。

让预演输出一张清单

每个文件输出一行:原路径、目标路径、计划动作。如果两行指向同一个目标,先标出冲突,不要让后处理的文件覆盖前一个。缺少日期时标记跳过,而不是偷偷改用今天的日期。

同一规则连续跑两次

在副本上执行,看数量是否一致,再打开几张确认目标文件正常。重复预演,已归档的文件应显示“不变”。如果第二次又多套了一层月份目录,说明规则还不适合用于原件。