Urgent.News

What's breaking now, across thousands of outlets.

Tech

What makes a batch file rename safe to undo?

An Undo button is useful only if the application still knows what happened to each file—and can explain when going back is no longer possible. I build RenamerX, a desktop file renamer. These are design notes about the boundary between suggesting a filename and changing a real folder. The example below is illustrative, not a benchmark or a report of a customer incident. Review the operation,…

An Undo button can only be helpful if the software still knows what changed with each file and whether it's feasible to revert those changes. RenamerX is a desktop file renamer I created to illustrate how to manage this boundary. The following steps outline the process:

1. Show the original file name, the proposed new name, and the destination folder together.

2. Use a preview to catch mistakes early, such as an incorrect date or wrong client name.

3. Separate content analysis from file operations by first generating a suggestion, letting a person edit or approve it, and then applying the approved operation.

4. For each item in a batch, the result should be clear. A failed operation due to a destination issue or conflict should be reported separately with a retry path.

5. Keep a record mapping the original path to the applied path and the outcome of the operation.

6. Undo functionality has preconditions. If a file with the original name reappears, restoring the old name should not silently overwrite the new file. Report the conflict and allow the user to resolve it.

7. Undo also depends on retaining history. Removing an operation from the workspace is different from reversing it on disk. If clearing the workspace removes the mapping needed for Undo, inform the user beforehand.

8. Use disposable files to test the failure path before trusting a batch renamer with important files. Review a small batch, apply it, and compare the reported results with the files on disk. Test Undo on a file with a different original name, check for conflicts, and ensure files are not overwritten. Retry the affected item and inspect the restored path.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Turn Your Cursor Rules Into One Root AGENTS.md

Most of my repos still have Cursor rules in some form. Sometimes a dusty .cursorrules at the root. Sometimes a pile of .mdc files under .cursor/rules/ .

  • Gather existing Cursor rules from repositories
  • Organize information into standardized headings
  • Commit single source of truth root file

How Do You Pick the Cover Frame for a Hit the Road Dude Clip? A Sharpness-and-Exposure Picker With ffmpeg and NumPy

When you post a Hit the Road Dude clip, the State Property meme where a driver at a pickup window repeats "State?" and sends someone off, the cover frame decides whether anyone taps it.

  • Sharpness determined by Laplacian variance of blurred frames
  • Exposure assessed by mean brightness and crushed pixel share
  • Frames from clip edges avoided, top timestamps printed for final decision

Rounding is a business rule: what your fee calculation actually charges

A fee calculator is mostly arithmetic, and the arithmetic is mostly correct. The part that produces support tickets is the last step: rounding. It looks like formatting.

  • Rounding is a business rule, not a technical choice
  • Store rounding mode as data, use Decimal end-to-end
  • Test tie cases, negative scenarios, and reconciliation

Custom payloads for the DJI Matrice 400: what can be integrated and how

Short answer: The DJI Matrice 400 is listed at about 9.74 kg with roughly 6 kg of payload and up to 59 minutes of flight time, which is enough to carry a Zenmuse gimbal and a second, custom payload at…

  • DJI Matrice 400 can carry 6 kg payload with 59-minute flight time
  • Custom payloads include 3D LiDAR, gas sensing, thermal imaging, broadcasting equipment
  • Successful integration requires balancing, power/data path, synchronized time data

More from Tuesday 10 November →