Disabling the 'New Folder' icon in a document library (WSS)

BusinessMicrosoftSharePointTechnology

Recently a project that I was working had a specific requirement where the client did not want “Folders” from being created in Document Libraries. They wanted users to apply meta data and set up guidelines so that users would not be able to create folders.

At the same time they did not want to modify the site definition files. i.e: You can modify the site definitions SCHEMA.XML to remove the code which applied the Folder icon. The SCHEMA.XML is in:

“$\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\STS\LISTS\DOCLIB\SCHEMA.XML“

Well this was quite easy than that I thought it would have been editing the SHEMA.XML thanks to a style element that’s applied to the code. The toolbar code adds the following html to create the New Folder icon.

The code can be found by viewing the source of the page:

Look for: <a tabindex=“2” ID=“diidNewFolder”…

So all i did was add the following to OWS.CSS OWS.CSS is in:

$\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033\STYLES\

#diidNewFolder

And voila.. no more folders without modifying the actaul SCHEMA.XML. Note: This change will apply to all WSS sites created in a Portal install.

← Back to blog