locked
how to rename document file name by workflow? RRS feed

  • Question

  • Is there any built-in function to rename file's name after adding file to a document lib?

    Seems Update Item, Set fields in Current item do not allow updating file names?

    thanks,

     

    Guangming

    Thursday, April 22, 2010 12:48 PM

Answers

  • Hi

    Yes it is set fields in current item and field will be Name(used in Form). it will rename your doc file name.

    Ex: Set Name  to abc.

    -Hardesh

    Friday, April 23, 2010 10:26 AM

All replies

  • Hi

    Yes it is set fields in current item and field will be Name(used in Form). it will rename your doc file name.

    Ex: Set Name  to abc.

    -Hardesh

    Friday, April 23, 2010 10:26 AM
  • That is what I thought so. In my case, I used Update Item in another list after the workflow copies and pastes a document from one doc lib to another doc lib. The workflow is associated with a third list.

    I got Updat Item errors. With your confirmation, I guess the reason might be that after the file is copied one workflow associated with the destination doc lib get kicked off and checked out the file, however the workflow associated with the list may just start to update attributes! Conflict here.

    I will try to move the update item attributes part to be associated with the destination doc lib workflow, or delay a little bit?

    thanks,

    Guangming

    Friday, April 23, 2010 1:29 PM
  • Hi

    Yes it is set fields in current item and field will be Name(used in Form). it will rename your doc file name.

    Ex: Set Name  to abc.

    -Hardesh


    I am confused at how this was ever marked as an answer. You can't update a file name using the 'Set field in current item'. The WF will fail.
    Monday, June 8, 2015 7:52 PM
  • I agree DWTK. It's the mot basic process I tried first, but the WF fails.... There must be another solution to rename the file.
    Friday, September 18, 2015 5:42 AM
  • 1. Create a calculated column in your list a that creates the name you want the file to be renamed to
    2. Create a workflow
    Action: If Current Item Field:Name is not empty Update List Item
    List: CurrentItem
    Field: Path and Name 
    Value: [%CalculatedColumnName%]
    3.On the Update List Item dialog box, click OK.
    4. Set workflow to start when new item is created
    • Proposed as answer by AmandaMatthews Wednesday, June 22, 2016 10:21 PM
    Wednesday, June 22, 2016 10:21 PM
  • 1. Create a calculated column in your list a that creates the name you want the file to be renamed to
    2. Create a workflow
    Action: If Current Item Field:Name is not empty Update List Item
    List: CurrentItem
    Field: Path and Name 
    Value: [%CalculatedColumnName%]
    3.On the Update List Item dialog box, click OK.
    4. Set workflow to start when new item is created
    • Proposed as answer by AmandaMatthews Wednesday, June 22, 2016 10:23 PM
    Wednesday, June 22, 2016 10:23 PM
  • I know this post is older but if you ever need to do this, see the answer I gave below. It should work for you.
    Wednesday, August 16, 2017 6:47 PM