Exporting audio file names and lengths to excel

Hawrylak

New Member
Joined
Dec 16, 2011
Messages
4
I am new to this form and in no way a programmer. It has been about 10 years since I have programmed anything so needless to say I need some help. I have a folder of audio files (.wav and or .mp3) and I would like to create an exel spreadsheet with a list of all the file names. I am able to do this now without a problem. The issue I am dealing with is I also need the length attribute associated with the aduio file in the spreadsheet as well. Ultimately what I need is a spreadsheet that has the file name in one column and the file length in another. Again, I am not familiar with VB so any help that can be provided would be greatly appreaciated. Thank you.
 
I really like the "mciSendString " option. I used to have to figure out the audio length by using a formula that used the file size. This is much cleaner.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
One other method would be to use the FileSystemObject...
Code:
Dim fs As Object     
Dim objFolder As Object     
Dim objFile As Object          
Dim Folder as String

Folder = "C:\AudioFiles\"  'Not sure if you need the last backslash

Set fs = CreateObject("Scripting.FileSystemObject")     
Set objFolder = fs.GetFolder(FolderName)          
For Each objFile In objFolder.Files
 
Upvote 0
Hello! I know this thread is super old but it's the only thing I can find in my quest to extract audio .wav format metadata to excel. My question is: the list in the code above does not include the BPM or Key metadata, would I just copy the
Cells(r, 8).Formula=FileItem.Length line, paste and change to Cells(r, 9).Formula=FileItem.BPM? Thank you in advance :)
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,024
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top