How to show a file extension within a document library view
Is it possible to enable file extensions to be shown when looking at documents within a document library. In some instance, files that are outside of the standard range either don't have an appropriate icon or shares the same icon type as another file. In this instance, my options are: - 1 - Add icons for these varied filetypes (Can be done, I'm not sure how) 2 - Show the file types within the document library views (can this be done?) 3 - An option of which I'm unawares. If anyone has any input here, I'd be grateful.
November 15th, 2007 5:38pm

Hi Steven, there's an easy way to do it, but you'll need SharePoint Designer. Open SharePoint Designer Select the WebPartPages:ListViewWebPart control Right-click, Convert to XSLT Data View Insert a new column into the data view I typed "Extension" in the gray header row In the first row below the header, right click and choose Insert Formula -> Expand the tree under Rows, Row, and select File Type, click OK. You should now see the file extensions shown in data view. --Hagen
Free Windows Admin Tool Kit Click here and download it now
November 15th, 2007 9:39pm

What does it mean: 'Select the WebPartPages:ListViewWebPart control' ? I've downloaded Sharepoint Designer, started and connected to my Sharepoint website but I do not see anything which looks like 'WebPartPages:ListViewWebPart'. -- Helmut
November 23rd, 2007 2:14pm

Hagen This shows the extension as an extra column. Is it possible to change the display pattern of the filename to include the extension? eg filename.ext I was able to do this by editing the onet.xml file in WSS 2 but have been unable to work a solution in WSS 3. Thanks Shaun
Free Windows Admin Tool Kit Click here and download it now
November 27th, 2007 1:37pm

Once you have opened the aspx file (I copy the Library View address to the open box), and the page is displayed in the middle of the screen, right click on the rows of data area of the page. This is the "WebPartPages:ListViewWebPart Control" Hope this helps
May 16th, 2008 2:14am

In WSS 3.0 using SharePoint Designer, you can insert a column (I call it Filename). Right click in the first row of that column and select insert formula. In the upper right hand box enter @FileListRef This should display the filename.Ext Be warned once you edit the WebPart with SharePoint you will no longer be able to edit it with anything else as far as I can find.
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2008 2:31am

I tried it and the formula is@FileLeafRefThis will display the name of the file including the extension. I created one new viewinthe library which is based on the "All Documents" view called someoneelse. Opened the someoneelse.aspx in Sharepoint Designer andfollowed the first 3 points of the upper instructions. The next steps were4. Right-click to the first item at the row "Name" and select "Insert Formula"5. In the upper right hand box delete the existing entry and insert@FileLeafRefThis will display the "Name (linked to document with edit menu)" row with file extension. After the file is saved in Sharepoint Designer the someoneelse view can't be edited in the Sharepoint site settings.
August 17th, 2009 7:35pm

I've written this up with illustrations here: http://www.itwriting.com/blog/articles/how-to-show-file-extensions-in-sharepoint-2007-document-lists Rather than amending the built-in view I suggest creating a new view since then you can easily revert if you mess anything up! Tim
Free Windows Admin Tool Kit Click here and download it now
January 15th, 2011 8:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics