Contents

Tutorial: reorganise local files with NearWork

Updated 2026-11-12

"Tidy up this folder for me" is the classic one-sentence request, and the easiest to get wrong: the model does not know your naming habits, nor which files must not be touched. All three scenarios below follow the same rhythm — look, propose, confirm, act — and the prompts are ready to copy.

Scenario 1: batch-rename photos by capture date

The goal is a filename that carries the capture date so sorting works. A prompt that does the job:

Scan D:\photos\2026, read the EXIF capture time of every image,
and rename to YYYYMMDD_HHMMSS.jpg (append _2 on same-second collisions).
Write the rename mapping to a CSV first so I can review it before you execute.

The important part is the last line: produce the mapping, then act. The model writes the old-to-new pairs into a CSV, you scan it for misalignment, and only then does the rename run. Under normal mode file writes and commands each ask for confirmation — resist the urge to switch to full_access to save clicks.

Files without EXIF (screenshots, images saved from chat apps) land in an "unknown time" bucket. A follow-up handles them:

For files without EXIF, fall back to the file modification time,
prefix the name with UNKNOWN_ and put them into _naming_pending instead

Scenario 2: file a Downloads folder by rule

Download folders mix installers, invoices, images, archives and duplicate downloads. Filing prompt:

Tidy C:\Users\me\Downloads:
1. Move .exe/.msi into installers/, keep the 3 most recent versions, older ones into installers/old/
2. Move .pdf into invoices/2026-11/ style folders, using the file modification month
3. Move images into images/ and archives into archives/
4. For files that are already duplicates, keep the newest and move the rest to _dup/
List the files to move and the counts first, and wait for my confirmation.

The real risk here is overwriting: when moving across directories, rule 4 has to run before the others or a later move can clobber an earlier one. Ask the model to state explicitly which entries will be overwritten or skipped — cheaper than recovering files afterwards.

Scenario 3: find duplicates and oversized files

Look first, delete later. Never combine scanning and deleting in one instruction:

Scan D:\work and find files with identical content by hash.
Output the groups (paths, sizes, modification times) and mark the copy you suggest keeping.
Do not delete anything yet — wait for my go-ahead on each group.

Then, separately:

Apply the deletions from the previous list, keeping the newest file in each group,
and move deleted files to D:\work\_trash instead of erasing them.

"Move to a trash folder first" is the cheapest insurance in local file work: it costs some disk space and makes second thoughts almost free.

Habits that keep this safe

HabitWhy
Ask for a list or mapping before executionA wrong rename is worse than no rename
Stay in normal permission modeWrites and commands are confirmed, so you can stop the run
Route destructive steps through _trashKeeps a rollback path
Trial-run on a small subsetValidate the rules on 20 files, then run the whole set

Pick the working directory carefully too: NearWork's tools stay inside the current working directory, so selecting D:\photos\2026 instead of all of D:\ shrinks the blast radius.

Frequently asked questions

Will non-ASCII filenames break?

No. Paths are read and written as UTF-8, so Chinese characters, spaces and brackets all work; for paths containing unusual characters, quote the exact path in your prompt.

Can I undo a bad run?

There is no global undo. That is exactly why the plan-first habit and the _trash step exist: they turn one irreversible action into two reversible ones. For directories that really matter, layer a system backup or a git repository underneath.

Do I need to write code?

No. All three scenarios are natural-language descriptions plus one confirmation; the model decides which tools to call — file editing, command execution, hashing. See the tool inventory.

Next steps

  • New to NearWork? Run through the quick start first.
  • Want more automation without the risk? Read the permission section of Data and privacy.
  • Curious about plans and credits? See the pricing page.

Scan to reach us on WeChat

NearWork WeChat QR code

Scan the code to add us on WeChat