Workflow template

Batch Rename and Sort a Chaotic Folder

Hand Cowork a messy Downloads folder or project dump and get a proposed rename-and-sort plan you can review before anything actually moves.

Copy-paste prompt

Look at every file in this folder and propose a reorganization plan. Group files into logical subfolders based on their content and file type. Suggest a clean, consistent filename for each file (use lowercase-with-hyphens, include a date prefix like YYYY-MM-DD if the file has a clear date). Do not move or rename anything yet. Instead, write a file called reorganization-plan.md listing every current filename, the proposed new path and filename, and a one-line reason for each decision. Flag any files you are unsure about rather than guessing.

A Downloads folder is basically a compost heap. Things go in, almost nothing comes out, and after a few months you have 400 files with names like final_FINAL_v3_USE_THIS.pdf and Screenshot 2025-03-11 at 14.32.07.png sitting next to each other in no particular order. Cowork can work through that pile and propose a structure. The key word is propose. You review the plan before anything moves.

Copy the Folder First

This is not optional. Before you do anything with Cowork or any other tool, duplicate the folder you are about to reorganize. On a Mac, right-click and choose Duplicate. On Windows, copy-paste the folder to the same location. You now have an original you can fall back on.

Point Cowork at the copy, not the original. Once you have confirmed the result looks right, you can repeat on the real folder or just use the copy going forward. The cost of this precaution is about ten seconds. The cost of skipping it and losing something important is not worth calculating.

What to Put in Scope

Cowork reads everything in the folder you connect it to. If that folder has subfolders, say so in the prompt and it will walk them recursively. If you only want it to look at the top level, say that instead.

For a typical reorganization job, a good scope is one messy folder and one level of its subfolders. Going deeper than that in a single pass can produce a reorganization plan so large it is hard to review. Better to do it in two passes: clean the top level, then recurse into the subfolders once you are happy with the structure.

The Prompt

With Cowork pointed at the copied folder:

Look at every file in this folder and propose a reorganization plan. Group files into logical subfolders based on their content and file type. Suggest a clean, consistent filename for each file (use lowercase-with-hyphens, include a date prefix like YYYY-MM-DD if the file has a clear date). Do not move or rename anything yet. Instead, write a file called reorganization-plan.md listing every current filename, the proposed new path and filename, and a one-line reason for each decision. Flag any files you are unsure about rather than guessing.

“Do not move or rename anything yet” is the most important line in that prompt. Cowork follows instructions precisely, so if you include that phrase, it will write the plan and stop. This is the dry run.

Reading the Plan

The reorganization-plan.md file will have a table or list with three columns: current name, proposed path, and reason. Scan through it looking for a few things:

Files that are flagged as unclear. These are usually files with unhelpful names (e.g., untitled.docx, copy (3).jpg) or files whose content Cowork could not determine from the name and extension alone. You need to open those manually and decide where they go.

Proposed subfolders that do not make sense for how you actually work. Cowork is inferring folder structure from the content it sees. Its inference is often reasonable but sometimes generic. If it is proposing a folder called documents inside a folder that is already called documents, that is a sign to rework that part of the plan before executing.

Names that are longer than you want. The prompt asks for clean lowercase-with-hyphens names. For some files that produces names like quarterly-revenue-analysis-board-presentation-draft-version-two.pdf. Fine to shorten those; just edit the plan file directly before you tell Cowork to execute it.

Executing the Plan

Once you have reviewed and edited reorganization-plan.md and are happy with it, send a second prompt:

“Now apply the plan in reorganization-plan.md. Create any subfolders that do not exist yet and move each file to its proposed path. Write a brief change log to change-log.md as you go.”

Cowork will execute each move in sequence and record what it did. The change log is your audit trail. If something ends up in the wrong place, you can look at the log to see exactly what happened and reverse it.

The Change Log

After execution, change-log.md will list every action taken: what file was moved, from where, to where. This is useful for two reasons. First, if you cannot find a file afterward, you can search the log. Second, if you want to undo the whole thing and go back to the original (which is why you kept the copy), the log tells you exactly what to reverse.

Keep the change log in the folder for at least a week. After that, once you are confident nothing is missing, you can delete both the log and the original copy.

A Note on Very Large Folders

If the folder has more than a few hundred files, the reorganization plan can get unwieldy. In that case, split the job by file type. Run the prompt once with “focus only on PDF files” added to the end. Review, execute, then repeat for images, spreadsheets, and so on. Each pass is manageable; one pass over 600 mixed files is harder to review carefully.

The other thing that slows down large folders is files with no useful metadata in the name. Cowork can read file contents to infer meaning, but reading the content of 600 files takes time. For a folder that is mostly images, tell Cowork to group by apparent subject or date rather than content. It will rely on filenames and EXIF data, which is faster.

Frequently asked questions

Is it safe to let Cowork rename files in my actual folder?

Copy the folder first, always. Work on the copy until you have confirmed the plan looks right. Only then apply changes to the original. This is not a Cowork limitation, it is just good file hygiene.

Can Cowork move files into subfolders it creates?

Yes. Once you approve the plan, follow up with: 'Now apply the plan in reorganization-plan.md. Create any subfolders that do not exist yet and move each file to its proposed path.' Cowork will execute it step by step.

What if I want different naming conventions?

Change the prompt. If your convention is TitleCase or you want underscores instead of hyphens, say so. Cowork follows the instructions in the prompt, not any assumed default.

What happens to files Cowork flags as unclear?

They stay where they are until you decide. The flag is Cowork's way of saying it does not have enough information to make a good decision. That is correct behavior.

More workflows