Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007
One of our customers wanted a way to *uncheck* the “Overwrite existing file” option by default. For better understanding, here’s what it is:
1. Open a team site in WSS V3.
2. Navigate to a document library.
3. Choose the *Upload* option to upload a document.
4. Here you'll see that the "Overwrite existing files" option is selected (*checked*) by default.
Well, if you have to do this in WSS V2, the procedure is pretty lengthy…
1. Open <Install Drive>:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPSTOC\LISTS\DOCLIB
2. After backing up the Schema.xml file, pop it open and look for the below tag:
1. <INPUT type=hidden name="putopts" id=putopts value="true">
3. Change value="true" to value="false"
4. And then find the below line in the same file (~ 7-8 lines down the line):
1. <INPUT TYPE=CHECKBOX name="overwrite" id=overwrite value="true" CHECKED DEFANGED_Onclick="setputopts()" tabindex=1 title="]]><![CDATA[Overwrite]]><![CDATA[">
5. Delete the word CHECKED from the above line.
6. Save the Schema.xml file.
After an IISRESET, the “Overwrite existing file” option should be unchecked by default for all document libraries.
In MOSS 2007/WSS V3, however, to do the above is quite simple. All that we need to do is to make a small modification to the *Upload.aspx* file located under: <Install Drive>: \Program Files\Common Files\Microsoft Shared\web server extensions\12\template\layouts.
Open the upload.aspx file and look for the following tag:
<asp:CheckBox id=”OverwriteSingle” Checked=”true” Text=”<%$Resources:wss,upload_document_overwrite_file%>” runat=”server” />
Change Checked=”true” to Checked=”false” . Really simple indeed isn’t it? Due to the fact that WSS V3 & MOSS 2007 is tightly integrated with ASP.NET 2.0 framework, most of such functionality is controlled through application pages instead of schema.xml files as in the previous version.
Well, if there’s a requirement for such cosmetic changes, you could look out for ASPX files. However, PLEASE NOTE : modifying any OOB (Out Of the Box) files is unsupported, so it’d be a good idea to keep a backup of the files that needs modification. It’s also a good idea to keep a backup of the *modified* files, just in case you don’t miss the customizations if those files were to be overwritten by future patches.
Comments
Anonymous
April 01, 2007
PingBack from http://www.virtual-generations.com/2007/04/02/sharepoint-2007-link-dump-4-2-2007/Anonymous
April 19, 2007
I tried this on our sharepoint server running SPS 2003 and WSS 2.0 and it didn't work...any suggestions?Anonymous
April 20, 2007
The comment has been removedAnonymous
August 28, 2007
my install path was slightly different just incase someone got stuck at the file path: Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATE1033STSLISTSDOCLIBAnonymous
August 28, 2007
jimmys, 60 hive is for SharePoint Portal Server 2003. MOSS 2007 has 12 hive. cheers, SriAnonymous
February 27, 2008
Thanks for your solution. However I don't have access to the 12 hive of the server and even our support team does not allow doing this for the entire MOSS sites. I just need this be done for one of the libraries. Is there anyway to achieve this?Anonymous
September 02, 2008
Hi, I have MOSS installed on my system. After making changes in <asp:CheckBox id=”OverwriteSingle” Checked=”true” Text=”<%$Resources:wss,upload_document_overwrite_file%>” runat=”server” /> Checked=”true” to Checked=”false”. I am getting 'Unknown Error'. Any help will be greatly appreciated. JohnAnonymous
January 07, 2009
Hi, This solution work very well but.... i would like to make this modification for ONE site only! It will be perfect if i could do this for a specific library! In sharepoint Designer, we can see upload.aspx, editform.aspx etc... under folder myLibrary/Forms/ . In can do some modification on the editform.aspx without problem. But upload.aspx doesn't work because when i upload a file, it the path goes directly on _layouts/Upload.aspx. Is there anyway to use the upload.aspx under myLibrary/form instead of _layouts/Upload??? Thanks and sorry for my bad english! ChristianAnonymous
May 03, 2009
After making changes in <asp:CheckBox id=”OverwriteSingle” Checked=”true” Text=”<%$Resources:wss,upload_document_overwrite_file%>” runat=”server” /> Checked=”true” to Checked=”false”. I am getting 'Unknown Error'. ---Help me. ThanksAnonymous
June 09, 2009
The comment has been removedAnonymous
January 22, 2010
Hi all, is there away to disable the button completely. Gray it out? We have a doc approve library and workflows/tasks where users upload doc to be approved and we don't want people (users) overwriting documents once submitted/in the approval process.Anonymous
October 07, 2010
This method doesn't seem to work for Sharepoint 2010. Is there a different method for the newer version?Anonymous
February 13, 2011
I've tried this solution but after applying it I get an "unkown error" every time I try and upload a file. I've reset the value of Checked to "true" and also restarted the server several times but I still get this error in every Sharepoint application. What can I do? Any help is appreciated! Thanks!Anonymous
February 16, 2015
WE can modify uncheck overwrite file when upload file using checked properties set with false. Please, refer to this blog with detail explanation : menetes.blogspot.com/.../sharepoint-2013-auto-uncheck-overwrite.html