SharePoint Document Library !New icon

Taking a look at the onet.xml (located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML) I did a search for the new.gif and found it surrounded by an <IfNew> element. A search on MSDN leads to this document which states:

“Returns TRUE if the item is considered new. Usually, this means that the item was created after midnight the day before. This element renders its contents if the item was created today, that is, after only one day has passed, the number of days being a registry setting for which the default value is 1.”


I had to read that a few times, but it boils down to two days.


To check that, run:


stsadm -o getproperty -propertyname days-to-show-new-icon -url “<site_url>”
It returns 2.
If you want to change it, run:
stsadm -o setproperty -pn days-to-show-new-icon -pv <number_of_days> -url “<site_url>”
Example :
  1. Click Start, point to All Programs, point to Accessories, and then click Command Prompt. or goto MS Power shell
  2. Type the following commands, and then press ENTER after each command:


 PS C:\Users\Administrator> stsadm -o getproperty -propertyname days-to-show-new-
 icon -url ""<Property Exist="Yes" Value="2"/>
 PS C:\Users\Administrator> stsadm -o setproperty -pn days-to-show-new-icon -pv 
 2 -url "http://inddev16:7576"

Operation completed successfully.



 PS C:\Users\Administrator> stsadm -o setproperty -pn days-to-show-new-icon -pv 0
 -url ""

Operation completed successfully.

Leave a comment