How to pre-select "Cancel" instead of "Replace" in the file saver?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
HyperBear
Level 1
Level 1
Posts: 42
Joined: Thu May 04, 2023 3:39 am

How to pre-select "Cancel" instead of "Replace" in the file saver?

Post by HyperBear »

I think most computer users have at some point accidentally deleted a file because of the way a file saver, also known as "Save as", handles file name conflicts.

If a file with the specified name already exists, the file savers in the major operating systems make the worst possible suggestion:
A file named "example page title.html" already exists. Do you want to replace it?
[Cancel] [Replace]
Out of the two buttons, "replace" is pre-selected, so pressing [kbd]Enter[/kbd] or the space bar will delete the existing file, and there is no "rename" option which would name the file "example (2).html" (counting up), or with a timestamp, much faster and more convenient than it could be typed manually.

The file replacement dialogue could be rephrased as the following without changing the meaning:
A file named "example page title.html" already exists. Do you want to delete the existing file?
[Cancel] [Delete]
This is something that has long disappointed me about the major computer operating systems, for over a decade. Not only do Linux file savers have this problem, but Windows too. I used to think "probably they will add a 'rename' button to that thing soon, because it is the most logical thing that is missing from there", but it never happened.

It looks like at least Microsoft realized the risk of accidentally deleting existing files, so they switched to pre-selecting "No" at some point, but as of Windows 8.1, "Yes" (delete the existing file) was pre-selected. Still, not as good as a "rename" button.

Is there any way to at least make "Cancel" (not deleting the existing file) the default selection on Linux Mint? Is there a hidden dconf setting for this, or does it require changing the source code and recompiling the program that creates the file saving dialogue?
Post Reply

Return to “Software & Applications”