Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

retrieve previous filename in case of shrepoint rename file (document library)

(0) ShareShare
ReportReport
Posted on by

Hi, I have a file library that I need to synchronize with an FTP folder. Everything works fine in case of file creation, deletion, and modification. What I can't achieve is when a file is renamed in SharePoint. In this case, the modification trigger is triggered, but I don't know how to retrieve the previous file name in order to rename it in the FTP. Thanks.

  • apellizzari Profile Picture
    apellizzari on at
    Re: retrieve previous filename in case of shrepoint rename file (document library)

    I also tried to make a versioning HTTP call in SharePoint, but the previous file name is not returned.

    {
    "d": {
    "results": [
    {
    "__metadata": {
    "id": "https://xxxx/ddf_doc_commerciale/_api/SP.FileVersiona43d0a97-1390-4a29-8e0d-397ba6a7f8e8",
    "uri": "https://dxxxx/_api/SP.FileVersiona43d0a97-1390-4a29-8e0d-397ba6a7f8e8",
    "type": "SP.FileVersion"
    },
    "CreatedBy": {
    "__deferred": {
    "uri": "https://xxxx/_api/SP.FileVersiona43d0a97-1390-4a29-8e0d-397ba6a7f8e8/CreatedBy"
    }
    },
    "CheckInComment": "",
    "Created": "2023-04-10T07:46:25Z",
    "ID": 512,
    "IsCurrentVersion": false,
    "Length": "31527",
    "Size": 31527,
    "Url": "_vti_history/512/Documenti condivisi/Immagini_sito/FA00078406B0____.JPG",
    "VersionLabel": "1.0"
    },

  • lbendlin Profile Picture
    lbendlin 7,597 on at
    Re: retrieve previous filename in case of shrepoint rename file (document library)

    I noticed the other day that the ODATA call against a SharePoint list returns the original column names. Might be interesting to try the same with a document library.

  • HenWang Profile Picture
    HenWang on at
    Re: retrieve previous filename in case of shrepoint rename file (document library)

    Hi @apellizzari ,

     

    For now, I think this is not possible to achieve in power automate flow. The file name information could not be captured before the user change the file name. Even the "Get changes for an item or a file (properties only)" action is not able to capture the value of the file name.

     

    I did think about other way like creating a new sharepoint list to hold all of the file names and do the filter action after someone change the file name and make the sync for the file in the FTP, but this would be too complicated and not ideal for this request.

     

    Best Regards,

    Hen Wang

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard