How to download file under same filename?

I have DropBox enabled on my Mac running Sierra and I have changed my Safari download location to the Downloads folder I created in my DropBox folder.

Whenever I download a file under the same name, Safari downloads it as 'name.extension', 'name-1.extension', 'name-2.extension' etc. Is there a way how I can prevent safari from doing this? When I download a file with the same filename, it is normally because it is an updated version from stuff that I make. Since DropBox allows you to revert to the previous version, it does not matter if I accidently write to the same name since I will be able to restore it.


There is no way to override that "feature" permanently. However, there are a couple of workarounds:

Hold the Option Key

Hold down the Option key when you click on the link and it will tell Safari to overwrite the file if it already exists.

I just tested it on Safari 10.10.3 and it works as expected.


Use Download Linked File As...

You can also specify interactively if you want to overwrite the file using the Download Linked File As... option.

Click on the link while holding the Control key (or right click) and you will be presented with a context

enter image description here menu.

After the "Save File Location" dialog box, if the file exists, you will be prompted to Replace or Cancel.

enter image description here


Set Safari to alway ask where to save downloads

This is done in Safari Preferences (, while in Safari). With this set as Ask for each download. if the file you are attempting to save already exists, you will be presented with a confirmation dialog as above.

enter image description here


The following trick once worked for me, but it's stopped working. The problem persists. Maybe you'll be more fortunate.

I would click on a .csv file, and try to save it onto an existing file. Safari pops up a dialog: “such-and-such.csv” already exists. Do you want to replace it?

I say yes, but it creates a NEW file: "such-and-such-1.csv".

SOLUTION:

  1. Under Safari Preferences, choose the Websites tab.
  2. On the left, choose Downloads.
  3. Find the source website, and change its setting from Ask to Allow.

It's not intuitive, but it works! I've been fighting this bug for six months now!

I'm using Mac OS Catalina (10.15.7) and Safari 14.0.