Change the name of a SharePoint document?

  • 30 January 2008
  • 7 replies
  • 2 views

Badge +3

Is there a way to change the name of a SharePoint document?


I didn't see "name" as a field in Document MetaData list of the SharePoint Documents Event Wizard - Update Documents' MetaData.  I figured this might be tough since the name is used a key to getting the document, but wanted to see if I missed an obvious way to do this.


Thanks,


Michael


7 replies

Badge +9

Not that I know off.  Normally the document name is configured up front during the upload.


The other alternative would be to use the SharePoint doucment wizard to first copy the document to the new name and then delete off the old document.  The downside would be that you would lose the versioning information if versioning was turned on.

Badge +7

I've had to do this with SharePoint 2, by modifying the database :-O ! not recommended!


perhaps you should look at: http://weblogs.asp.net/mnissen/archive/2005/11/17/430785.aspx which is about changing the filename on upload to sharepoint... once the document is in sharepoint, I don't know of a way to modify it.... short of hacking the content database :-P


 Martin

Badge +3
The copy / delete method would be perfect for my situation.  However, I don't see anywhere in the wizard where you can specify the new name.  You select the name of the source document, but then it uses that same name for the destination document.  Is there an option I'm not seeing?
Badge +7

If you follow instrtuctions here: http://blog.mgallen.com/?p=114 on how to view the event code for the method that you wish to rename your file in, you can add your own custom code to alter the filename I would assume.


Martin

Badge +3
Unfortunately, I think how K2 uses the name is part of the K2 DLL that is called, not the code that is available when you view the event code.
Badge +9

Hi guys, hopefully you're still watching this thread - I realise it was posted a while ago, but I am just trying to do the same thing.


 I was wondering about a possible solution:
Would it be possible to download the document to a K2 field using a document event, and then, using another document event, upload the document to a document library from the K2 field? I think that when you do this you are prompted for the name you want to use? This may be a little inefficient(?) however if it is the only way, then it could work...

Look forward to hearing from you if you did manage to get this to work.

Badge +4

Hi,


In my current project I change the name of the document according to a provided parameter in the URL. Additionaly I pre-save the form to avoid loosing documents by user not submitting.


Though I don't know if that is what you need (change the forms name from the beginning).


Regards,


DD

Reply