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 / How to get audio file ...
Power Automate
Unanswered

How to get audio file length?

(0) ShareShare
ReportReport
Posted on by

Hi guys! I am building a flow and i need a subflow to read the length of an audio file. Do any of you know how to do this? Thanks

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

    Hi @Dollaru 

    You can do this by reading the metadata of the file.

     

    Paste the below code into a blank Desktop Flow editor, change the file path and run.

     

     

    SET FullFilePath TO $'''C:\\Test\\FileName.mp3'''
    File.GetPathPart File: FullFilePath Directory=> Directory FileName=> FileName
    Scripting.RunVBScript VBScriptCode: $'''Dim oAppShell, oFolder, output
     
     Set objFso = CreateObject(\"Scripting.FileSystemObject\")
     Set oAppShell = CreateObject(\"Shell.Application\")
     
     varFolderPath = \"%Directory%\"
     Set oFolder = oAppShell.Namespace(varFolderPath)
     
     
     File = \"%FileName%\"
     
     output = oFolder.GetDetailsOf(oFolder.items.Item(File),27) 
     
     WScript.Echo output''' ScriptOutput=> VBScriptOutput
    Display.ShowMessageDialog.ShowMessage Message: $'''The length is: %VBScriptOutput%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    

     

     

     

    VJR_0-1671072791498.png

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 382

#2
Valantis Profile Picture

Valantis 370

#3
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

Last 30 days Overall leaderboard