Reputation: 23
I am completely new to bat files. I have a folder with several thousand audio files. I would like to "export" the name and length of each and save them in a single text file. It seems simple, but I've struggled for hours just trying to get started. Can someone please help?! Thank you!!!!
Upvotes: 2
Views: 2203
Reputation: 78842
Here's a PowerShell script that you can use to print MP3 filenames and audio duration. Redirect the output to a file as needed.
$path = 'C:\Users\Public\Music\Sample Music\'
Get-ChildItem $path -Filter *.mp3 -name | Foreach-Object {
$shell = New-Object -COMObject Shell.Application
$shellfolder = $shell.Namespace($path)
$shellfile = $shellfolder.ParseName($_)
write-host $_ $shellfolder.GetDetailsOf($shellfile, 27);
}
And here's info on how to run PowerShell scripts.
Upvotes: 2