Batch rename files with a preview and a safe export
Build and preview a naming rule, check collisions and verify the extracted ZIP.
Choose a naming rule and preview the original-to-output mapping before applying it, checking that every file keeps the intended extension and that the sequence still follows the order you selected. In the practice run the cover moved from draft.cover.pdf to acme_delivery.cover_final_001.pdf, and the notes and data received their own sequence names. Export a separate ZIP and inspect its names and contents, then use the open workspace’s Undo control or a saved reverse mapping for staged local copies when a rename needs to be corrected.
What to look for
Use this guide when several deliverables need a common client prefix, final version marker, sequence or recognizable stem before sharing. A mixed folder may contain files with different extensions and more than one period in a name. Replacing part of the wrong component or numbering files after an unexpected sort can make an otherwise correct delivery confusing.
It is also useful when flattening imported folders could bring the same filename into a single output directory. Decide the desired names and their order first. A readable preview and a separate saved artifact let you uncover an error without putting originals at risk.

Why it happens
A naming rule works from the original filename. In the practice rule, the part before the final extension contains the meaningful stem. Literal find and replace updates that stem, then prefix, suffix and sequence identify the resulting delivery name. Numbering uses import order, including excluded files. Sorting the display changes how you inspect the list, while the numbering continues to reflect the original input sequence.
Before you begin
Download and extract rename-inputs.zip. It contains draft.cover.pdf, draft.notes.txt and draft.data.csv. Import the PDF first, the notes second and the data file third for this example. Each name includes a draft marker and a distinct extension. Keep the original files in a separate location and create test copies in a working folder if you plan to rehearse renaming on disk as we did in the lab.
Write the naming convention down. The example places acme_ at the start, changes the draft. marker to delivery., appends _final, and gives each file a three-digit number starting at one. Keep the extension that belongs to the file. Decide whether each file should be included before exporting the full set, and check the resulting number order against the handoff request.
Steps
Load the files in a clear order and keep a source view.
Open the renamer linked at the end. Add the practice files in the stated order. Verify the original names in the table before changing the rule. Use the filename order that matches your recipient’s reading or review sequence. If the upload picker reorders a group, add the files individually in the desired order and review the displayed original names again.
- For work that changes disk paths, do the rehearsal on copies and keep the originals whole.
- Decide how you will reverse a change before touching the working folder.
- The lab took a directory listing and captured a digest for each input so the restored state could be compared with the starting state afterwards.
Build the rule and check one representative row first.
In Rename, leave the new base name blank. Set Prefix to acme_, Suffix to _final, Find to draft. and Replace with to delivery. Enable sequential numbers with a start of one and three digits. This is literal, case-sensitive replacement in the stem. The final .pdf extension remains intact.
- pdf.
- Use it to check the order of operations.
- The replacement changed the original stem.
- The prefix and suffix were added around the changed name, and the number appears before the extension.
- If the name is wrong, reset the rule and check the original again before applying anything.
Inspect every planned name and resolve collisions.
The other preview paths should be acme_delivery.notes_final_002.txt and acme_delivery.data_final_003.csv. Compare every result with its original row. Look for changes to the wrong stem, missing parts of the subject, an accidental extension change and unusual names that will be hard to understand after extraction.
- If the job flattens imported folders, check for names that collide.
- pdf.
- The suffix avoided a duplicate path in the export plan.
- Compare the contents separately if you need to decide whether either file can be omitted, then recheck paths after making the selection.
Apply the preview and verify the resulting copies.
Select Apply preview, then download a ZIP and extract it into a fresh folder. The workspace applies the planned names inside the archive while keeping the original files on disk. Compare the approved preview with the three extracted filenames and open the outputs. Include the inventory if the recipient needs the mapping from original to exported path.
- js rename operations on isolated copies inside a temporary folder.
- We listed the actual directory after applying the plan and compared the bytes with the original checksums.
- The output archive in the sample list uses the reread renamed copies.
- This rehearsal models a controlled folder operation alongside the separate browser ZIP workflow.
Rehearse undo and keep evidence of what returned.
In the browser workflow, use Undo last operation while the same workspace is open, then check that the previous export paths are restored. The original files stay available for an updated export. Undo affects the current plan, so keep or clearly identify any ZIP you have already saved. Re-export if the package needs a corrected name or selection.
- In the isolated folder, we ran the saved name mapping in reverse. We used the original and applied names from the same plan, read the filenames that actually returned, and compared their hashes with the starting files. The three original filenames and all their hashes matched. The undo record gives the original, applied and restored names. If another file has appeared in a target location, resolve the conflict before applying a reverse plan on disk.
Check your result
Compare the preview and applied results row by row. For each file, verify the unchanged extension, original stem or intended replacement, prefix, suffix and sequence. Check that the three export paths are distinct. Open the saved outputs from the ZIP, then optionally check their digests against the original bytes to confirm that only their paths changed.
After undo, read the actual folder listing or browser preview rather than relying on a status message alone. The lab compared the original and restored directory listings and reopened all the restored files to verify their SHA-256 values. Browser undo likewise returned the preview to its earlier paths. Keep those two checks separate when you adapt the process to a local folder or a newly exported ZIP.
| Original name | Applied name | Restored name |
|---|---|---|
| draft.cover.pdf | acme_delivery.cover_final_001.pdf | draft.cover.pdf |
| draft.notes.txt | acme_delivery.notes_final_002.txt | draft.notes.txt |
| draft.data.csv | acme_delivery.data_final_003.csv | draft.data.csv |
Common mistakes
Trusting a sorted view to define the sequence. Check import order and read each planned number. Re-import in a known order when the intended sequence differs.
Replacing the wrong segment or dropping a meaningful stem. Preview a file with a compound name. Leave the base name blank when you want to keep meaningful parts of the original names.
Flattening folders without checking collisions. Read any added suffix and inspect which original belongs to each path. The measured report example shows the explicit second-name suffix.
Assuming an Undo click corrected an existing ZIP. Reopen the current preview, compare its paths and download a new archive if you need a replacement. Use the reverse mapping when rehearsing on disk copies.
Limitations
The browser tool applies paths to a new ZIP, and the workspace’s history lasts for the open session. The on-disk exercise operated on controlled test copies and verified the restoration. Review collisions, permissions and destination paths before using name changes on your own data.
Test record
Tested on 2026-11-23 with Veylunex File Workspace 1.0.0 under Node.js v26.4.0. We also exercised the workflow in Google Chrome 157.0.8103.80. We renamed 3 staged copies, read the disk paths and reversed the mapping. All restored names and file digests matched the source.
The measurement record lists the local outputs and their SHA-256 digests.
Tested in
Questions
Can the rule change a name that contains more than one period?
The final extension stays separate in this example. The rule replaces the draft. portion of the remaining stem and then adds suffix and number. Check a representative compound name in the preview.
What if I want to keep the original sequence after sorting?
Use the preview numbers as your check. The sequence follows import order. Sorting a table is a view operation and can be useful for spotting a name or a collision.
What can I do if the names are wrong after exporting?
Restore or adjust the current plan and export a replacement ZIP. For local test copies, use the verified reverse mapping and confirm that each restored name has the expected bytes.
Will a suffix after a collision tell me which copies match?
Use the suffix to identify a distinct export path. Run the separate file content check when you need to decide if the named files have matching bytes.