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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard