Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Suppose I have a Sharepoint Document Library that's read-only. I'm planning on writing a custom solution that will enable users to copy a file to remote file storage. How do I change the file to refer to its new location using the object model?

Basically I want to know whether I can update a SPFile location to point to an external location.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

No, you cannot have SPFile pointing to an external location. What you could do is to add a redirect (.aspx) or link file (.lnk) that takes you to the file on the external location.

share|improve this answer
    
I would prefer the .aspx solution in that case. How would I create the redirect then? Using something like Response.Redirect("new.aspx");? Just a minute ago I found out about a content type called "Link to document". Would that be a solution, perhaps? –  Michael Davids Jun 6 '12 at 8:48
2  
Exactly, use the Link to document CT, that will probably help you. May I ask why you want to move it to an external location? –  Wictor Wilen MCA MCM MVP Jun 6 '12 at 8:50
    
Thanks for the quick response. I'm moving it due to record compliancy. –  Michael Davids Jun 6 '12 at 9:30
    
Have you looked into the Records management features of SharePoint? –  Wictor Wilen MCA MCM MVP Jun 6 '12 at 9:40
    
I certainly have, in facts it's directly related to it actually. I can't give out more information about the project though :-) One last thing: I assume if this is possible in a List, I can implement a solution with the "Link to a Document" Content Type in the Records Center as well? That uses Lists/Document Libraries as well - right? –  Michael Davids Jun 6 '12 at 10:31
add comment

Your Answer

 
discard

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.