Plan First, Then Touch Original Files
AI can suggest classifications for a downloads folder, client handoff, or project directory. But "move, do not delete" is not a safety guarantee: collisions, permissions, partial failure, and incomplete undo logs can still lose data.
Start with a small disposable fixture. Before organizing personal or company files, create a readable backup and destination copy, and verify completeness before considering removal of originals. The earlier example script did not adequately handle destination creation, paths, collisions, or interruption recovery, so it has been removed; do not treat it as a safe move tool.
Step 1: Prepare Disposable Test Data
Create a new practice directory with a few non-confidential copies, such as a document, image, and CSV. Do not practice on a production directory. Verify that you are authorized to read the data and understand how the CLI and model provider handle file contents.
Define allowed source and destination roots, categories, whether file contents may be read, and how to flag uncertainty. Default to no deletion, overwrites, or following unknown symlinks. Do not reach for sudo just to make a directory operation work.
Step 2: Ask the Agent for a Plan Only
Open the practice directory in Termdock, start an installed and authenticated AI CLI, and use its permission settings to restrict actions. Replace the bracketed location with your actual path:
Read only the files I am authorized to process in [test source directory].
Propose a classification list with source path, proposed destination, reason,
file type, and uncertainties. Flag duplicate destinations, paths outside the
allowed roots, and symlinks. Do not create, move, overwrite, or delete files.
A prompt is not a sandbox. Use the CLI and operating system's permission controls and an actually isolated test environment when appropriate. Check that the list covers every expected file, including duplicate names and unclassified items. Inaccessible files are gaps, not completed work.
Step 3: Hand the Plan to Another Session in Termdock
Give the classification list and source/destination boundaries to an agent in another terminal. Ask it to report omissions, duplicate destinations, out-of-scope paths, and unknown files without editing anything. The Termdock agent handoff walkthrough can also let a coordinator send the task and read the response. Sessions do not automatically share conversations, and a Termdock workspace is not a security sandbox.
Inspect the plan and correct classifications yourself. An unreviewed list or missing authorization is not a reason to start moving or deleting files.
Step 4: Copy and Verify
For valuable originals, first create and verify an independent readable backup. Then copy approved items to a new destination. Avoid overwriting existing files; stop and report collisions, permission errors, or unexpected paths. Reconcile the source and destination file count, relative paths, sizes, and content hashes against the plan, and open files when needed to confirm readability. Agree on directory, metadata, package, and symlink handling in advance; ordinary file counts alone do not verify those objects.
Retain every original until the destination copy is fully verified. Even after the copy and backup are confirmed, removal of originals needs an explicit decision and authorization. Keep the source list and result record; an agent-generated undo script is not a verified backup.
Step 5: Expand Only After a Small Batch
Verify a small batch for classification, missing files, and overwrites before expanding. Record source, destination, status, and errors for every batch. Stop on failure rather than skipping it and continuing to delete originals. Termdock can keep the work and review terminals available for a long run, but a running terminal is not proof the data has been verified.
Takeaway
AI can propose categories and handoff records; it cannot guarantee file safety. Test, back up, copy, and verify first. Only then can an authorized person decide whether to remove originals. You do not need to give an agent your entire downloads directory to start.