SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to answer a business question that requires us to provide links to files in SharePoint 2010. The names and metadata of these files may change over time so we can't use these in the links we provide.

Is there any other "unique file reference" that can be used to access a file that will always work regardless of any changes to the file's name or metadata.

share|improve this question
Please read our FAQ on how to tag (e.g. tag by feature not by version). If a tag you'd like to use is missing, simply flag a moderator. – Alex Angas Jun 28 '11 at 23:48
up vote 1 down vote accepted

You could use the Document ID Service that will uniquely identify a document. This will generate a unique identifier for the document and give it a distinct URL, from the referenced blog post, it'll look like, http://sitecollectionurl/_layouts/DocIdRedir.aspx?ID=MFSHF5F7ZUF5-1-1.

share|improve this answer
Be aware that this will only give unique IDs within the site collection and even then there's ways to break it. – Alex Angas Jun 28 '11 at 23:43

Yes - you can use the file's GUID. Retrieve the GUID of an existing file using SPFile.UniqueId and open the file using SPSite.OpenFile(GUID).

share|improve this answer

Are these documents stored in a document library? The list entry ID will never change, no matter how many times you change the name, meta data, etc. So you can always use a link such as http://sitecollection/library/forms/dispform.aspx?id={0} to show the "View Properties" screen for any file; there people can view the meta data and/or open the file.

share|improve this answer

I prefer @webdes03 answer as it is the easiest solution. However, you may also want to have a look at third party URL Shorteners for SharePoint. This can work very well, especially in combination with workflows.

I have conveniently included the link to one that I worked on :-) But other ones are available as well, not sure if the others work on SP2010.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.