web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Rename Mp3 Files in a ...
Power Automate
Answered

Rename Mp3 Files in a Folder using the Title in the metadata properties

(0) ShareShare
ReportReport
Posted on by 4

Hay Folks!,
I am new to Flows 🙂
I am trying to build a flow in Power Automate Desktop to rename a bunch of Mp3 files based on the Title property in the corresponding detail section of each file. Hope the following screenshot explains it all.
Thanks

Fowmy_0-1650898879761.png

 

I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    If I have a folder with file names and their titles in the below format (as an example)

     

    VJR_1-1650946158009.png

     

     

    They get renamed to Title after running the Flow

     

    VJR_3-1650946606313.png

     

     

     

    This is a vbscript approach. You can use anything else like Powershell etc.

    The script used is:

     

     Dim oAppShell, oFolder, output
     
     Set objFso = CreateObject("Scripting.FileSystemObject")
     Set oAppShell = CreateObject("Shell.Application")
     
     varFolderPath = "%FolderPath%"
     Set oFolder = oAppShell.Namespace(varFolderPath)
     
     
     For Each oItem In oFolder.Items
     'Check here if title is empty
     
     'If a file with already same name exists while moving then it will throw error. Please handle accordingly
     objFso.MoveFile oItem.Path, varFolderPath & oFolder.GetDetailsOf(oItem, 21) & ".mp3" '21 is to get the Title
     Next
     
     

     

    Copy paste the below code in a blank flow editor and check the outputs.

    Please refer the green comments inside the vbscript.

     

    SET FolderPath TO $'''C:\\Test\\'''
    Scripting.RunVBScript VBScriptCode: $''' Dim oAppShell, oFolder, output
     
     Set objFso = CreateObject(\"Scripting.FileSystemObject\")
     Set oAppShell = CreateObject(\"Shell.Application\")
     
     varFolderPath = \"%FolderPath%\"
     Set oFolder = oAppShell.Namespace(varFolderPath)
     
     
     For Each oItem In oFolder.Items
     \'Check here if title is empty
     
     \'If a file with already same name exists while moving then it will throw error. Please handle accordingly
     objFso.MoveFile oItem.Path, varFolderPath & oFolder.GetDetailsOf(oItem, 21) & \".mp3\" \'21 is to get the Title
     Next
     
     ''' ScriptOutput=> VBScriptOutput ScriptError=> ScriptError
    Display.ShowMessageDialog.ShowMessage Message: $'''DONE''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    
    # [ControlRepository][PowerAutomateDesktop]
    
    {
     "ControlRepositorySymbols": [],
     "ImageRepositorySymbol": {
     "Name": "imgrepo",
     "ImportMetadata": {},
     "Repository": "{\r\n \"Folders\": [],\r\n \"Images\": [],\r\n \"Version\": 1\r\n}"
     }
    }
    

     

     

     

  • Verified answer
    JamesP_MSFT Profile Picture
    Microsoft Employee on at

    @Fowmy if the answer solved your issue, please mark the thread as resolved.
    Thank you.

  • Fowmy Profile Picture
    4 on at

    Thanks for the support @VJR 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard