I searched for this question but only found stuff for cp.
Is there a way to stop the prompt for overwriting an older file using my file manager?
I searched for this question but only found stuff for cp.
Is there a way to stop the prompt for overwriting an older file using my file manager?
This is a user-interface design since the early days of computing. You can override this behavior at the command line (cp
), but UI guidelines require a copy (usually by drag-and-drop) to be non-destructive. Trust me, if it were not the case you would be very sorry some day...
So you say I can not turn off that behavior?
To me, when I want to overwrite an older file, it is for good reason.
I love Linux. I had to use Windows at my library.
But common sense should come into play.
If I want to replace an OLDER file, it is because I made improvements to it.
It is not rocket science.
Best regards,
Andy
There is no way I know of in commercial (or open source) software to modify this behavior.
While this behavior may be what YOU want, developers have to take into account all user behavior...
Consider this: The Copy
command on a menu serves a twofold purpose: It takes an object, whether it's text within a file, or a file itself, and places it in a holding area, generally known as the clipboard. The next step is for the user to move to the insertion point and paste
the contents of the clipboard. It's the Paste
operation that examines the target, and if it exists, asks you what you want to do (it doesn't care about text; there's an undo
function in case you need it). This is protecting users from themselves.
Incidentally, the move operation (mv
) at the command line is simple two commands rolled together: cp
and rm
. In other words, copy the file then delete the original.
What you find an annoyance others have found to be a lifesaver.
If you really want/need this capability, why not build your own? It can be easily (more or less) done using a tool like yad
or zenity
.
Please stop looking for my posting on other sites.
Get a life.
I'm not looking for re-posts, but scanning sites looking for 'new problems' experienced by users, as they tend to report problems (due to a upgraded package etc) at similar times, but on different sites.
Seeing the same post on multiple sites wastes my time (and that of others using multiple sites), esp. when not quickly recognized as a duplicate. If the question has a link for where it's also asked, or just says they'd asked elsewhere (if they don't want their accounts linked) I'm not wasting time, and will try and answer it if I can, or just move on.
I have no problem with users asking the question on multiple sites; but please report on your questions that you've done it, so you're not wasting the time of helpers/volunteers trying to help and/or make products better.
At a minimum, my listing the duplicate question, saves other volunteers time who also scan multiple sites - why its done
Here's a quick bash
script that uses yad
to provide a GUI for the copy process that replaces an existing file without warning. It's rough, and can use a little cleaning up, but it works.
#!/bin/bash
# Prompt user to select source file
src=$(yad --file-selection --title="Select Source File")
# Check if user selected a file
if [ $? -ne 0 ]; then
yad --error --title="Error" --text="No source file selected."
exit 1
fi
# Prompt user to select destination file
dst=$(yad --file-selection --save --title="Select Destination File")
# Check if user selected a destination
if [ $? -ne 0 ]; then
yad --error --title="Error" --text="No destination file selected."
exit 1
fi
# Copy source file to destination, overwriting if necessary
cp -fp "$src" "$dst"
# Display confirmation message
yad --info --title="File Copied" --text="File copied successfully."
I apologize for my tone. I have no excuse.