How to add todays date to a file name during upload in sharepoint library?

Raki 481 Reputation points
2020-11-05T18:28:54.997+00:00

Hello,

i am trying to concatenate today's date with file name when user will upload the document. so basically trying to have unique file name with date. another question, is it possible also to alert them for duplicate file when they upload? i know alert message available when you drag and drop.

Thanks

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,684 questions
0 comments No comments
{count} votes

Accepted answer
  1. JoyZ 18,066 Reputation points
    2020-11-06T08:11:53.82+00:00

    Hi @Raki ,

    Currently, there is no OOB method to add today's date to the file name during upload processing.

    As a workaround, we could use "Send a http request to SharePoint" action in flow to rename the file after the file has been uploaded successfully.

    Simple test for your reference:

    37916-image.png

    After completing the flow, file name will show like this:

    37856-image.png

    Please note that the action executed in the Flow for the files in SharePoint will change the version of the file, and the Modified user is determined according to the account of the connection configured on the action.

    Since we cannot change the file name when uploading files, there will be no duplicate files because duplicate files will not be uploaded successfully.

    37993-image.png

    Similar issue for your reference:

    https://powerusers.microsoft.com/t5/Building-Flows/Renaming-a-File-in-SharePoint-Online/td-p/176708


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.