If you upload a new file with same name, in the same folder as the previous one, you get this option:
If you do nothing the new file stays as it is, overwriting the old one. If you click the "Keep as separate file", you'll get a new file with a (2) after. as in file(2).rar :)