This applies to both SharePoint 2007 and SharePoint 2010. The only difference is the page name, upload.aspx for SP 2007 and uploadex.aspx for SP 2010.
Problem… Users are uploading files and are accidentally overwriting existing files, or if versioning is enabled, accidentally adding a new version to the wrong file (one with the same name as the upload).
One possible solution would be to modify the upload.aspx page (uploadex.aspx in 2010) to change the default of the "Overwrite existing files" checkbox. This normally defaults to checked. (I tell people that "Overwrite existing files" is short for "Overwrite existing files and don't tell me that I'm about to destroy days of someone else's work")
You will need access to the web servers…
The edit is simple, but you will be modifying a LAYOUTS page on the web server. This generally to avoided as it may get overwritten on the next service pack update, and the change must be part of your disaster recovery plan and these files are not backed up with the content databases.
That said... do the following at your own risk...
- On the web server (and this must be duplicated on each web server) drill down to the SharePoint 12 hive and find "12\TEMPLATE\LAYOUTS\upload.aspx". (NOTE: for SharePoint 2010 edit uploadex.aspx)
- Play it safe and Right-click, Copy and Right-click Paste to make a backup!
- Open the file with Notepad. Search for "Overwritesingle" and just after that change "true" to "false"
<asp:CheckBox id="OverwriteSingle" Checked="false" ...
- Search for "Overwritemultiple" and just after that change "true" to "false"
<asp:CheckBox id="OverwriteMultiple" Checked="false" ... - Save the file and go upload a file and see if it does what you want
This takes care of Upload and Upload Multiple.
Windows Explorer will prompt the user by default "This folder already contains a file named....", so that’s covered.
This edit will not impact email enabled libraries and overwrites or new versions are still possible.
One final note... the same checkbox is used for versioning and says "Add as a new version to existing files" instead of "Overwrite existing files". After the above edits if the user forgets to checkmark the box, they just get a "file exists" error.
.