cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to rename a file in a document library?

Is it possible to have a workflow that can rename the file once uploaded to a document library?

 

I have a library where multiple reports are saved on a daily basis. I want to move these files to their designated libraries but I want to change the source filenames so that I see only one version in the destination with multiple version behind it. The filenames (documents) at the source have both a name and a date/timestamp. I want to be able to rename a report to something generic (report name only with no date/gibberish) so that I see only one filename (document) with the multiple versions behind it.

Labels: (1)
Reply
3 Replies
Workflow Hero

Re: How to rename a file in a document library?

Shawn,

You could use the set a field value or update action to change the metadata of your document.

With the set a field value action you can only change one metadata field at the same time while with the update item action you could change multiple.

You could also let the workflow fire on item creation through your workflow settings.

Glenda

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to rename a file in a document library?

Shawn, it sounds like the real issue here is renaming the file from the source to the destination - so that the destination file has the name of an existing document and is added as a new version.

In this situation, I've used a tertiary library to store the document in transit. In this separate library I can set the final filename to match what's in the destination library. You may need a couple of separate workflows to complete the copy/rename/revise-existing document process depending on where your lists reside and how the process is initiated.

An alternative to this is if you're destination library has folders for each of the different types of reports (and no documents would normally reside in the root of the library). You can copy your document to the root folder, rename it there, copy it to the folder where the existing version is - updating it. You then have to remove the one sitting in the root folder. Again, considering how your site is configured, you may need a couple of separate workflows to accomplish this.

Good luck,

Gerard

0 Kudos
Accept as Solution Reply
Not applicable

Re: How to rename a file in a document library?

Thank you for your responses. I was able to resolve my issue by creating a separate library (for documents in transit) where I then set the field values on the documents in question before sending to their designated libraries.

0 Kudos
Accept as Solution Reply