Welcome to MSDN Blogs Sign in | Join | Help

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.

Published Sunday, April 01, 2007 11:39 PM by sridhara
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Monday, April 02, 2007 2:17 AM by " + title + "

# " + title + "

Thursday, April 19, 2007 1:25 PM by Wes

# re: Make the "Overwrite existing file" check box to be unselected by default

I tried this on our sharepoint server running SPS 2003 and WSS 2.0 and it didn't work...any suggestions?

Saturday, April 21, 2007 2:37 AM by SridhaRa's [MSFT] WebLog

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

Wednesday, August 29, 2007 3:20 AM by jimmys

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

my install path was slightly different just incase someone got stuck at the file path:

Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\STS\LISTS\DOCLIB

Wednesday, August 29, 2007 3:37 AM by sridhara

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

jimmys,

60 hive is for SharePoint Portal Server 2003.  MOSS 2007 has 12 hive.

cheers,

Sri

Wednesday, February 27, 2008 3:32 PM by Phani

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

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?

Tuesday, September 02, 2008 9:33 AM by John

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

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.

John

Wednesday, January 07, 2009 11:46 AM by Christian

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

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!

Christian

Sunday, May 03, 2009 10:49 PM by Hoang

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

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. Thanks

Tuesday, June 09, 2009 9:30 AM by Sergio Giusti

# re: Make the "Overwrite existing file" check box to be unselected by default in MOSS 2007

Hi

Does anyone have a copy of the simple.master.aspx page from an out of the box MOSS 2007 installation as i have broken mine and would prefer not to have to do a reinstall or repair to fix the page.

thanks

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker