Unique File Naming Solutions for document libraries
I have a document library with a excel custom template.
When my user's save a document, I'd like to guarantee that the filename is unique...when the document is SAVED.
how to accomplish this? A workflow is not an option.
April 28th, 2011 2:47pm
I guess, you could have an event handler. After you upload the document, you could do an item adding event handler which could verify if the document with that particular name exists. If it does, you could make it unique either by adding a GUID or prevent
it from adding and allow users to change the title before uploading.
Hope this helps.V
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 3:27pm
Hi,
Alternatively, you can add columns to the library by way of recording metadata, thus empowering user to not simply uploading a file.
hth,Chirag Patel, MCTS
@techChirag
techChirag.com
April 28th, 2011 11:27pm
Hi Chirag,
Would you mind explaining your answer in a little more detail?
Thanks!
Free Windows Admin Tool Kit Click here and download it now
April 29th, 2011 1:46pm
Hi,
There is no real guarantee to have a unique filename, other than creating additional columns to describe the properties of file content.
Another alternative is, by default, document library has an ID field you can just modify the view to include this ID column in display. That way the user can still see two identical filenames but with different ID.
hth,Chirag Patel, MCTS
Blog: techChirag.com
Twitter: @techChirag
June 1st, 2011 12:06pm
Please refer to the following URL, you can write an event handler similar to this to prevent duplicate file name in your document library.
http://sharepointserved.blogspot.com/2011/06/prevent-duplicate-field-name.html--Cheers
Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2011 5:31am