Snippets Collections
$Directory = 'D:\Users\Public\Public.Language\Pronounce it Perfectly in Spanish 2e\Pronounce it Perfectly in Spanish 2e.Down.Load'
$Shell = New-Object -ComObject Shell.Application
$Folder = $Shell.Namespace($Directory)

1..512 | ForEach-Object {
    $prop = $Folder.GetDetailsOf($null, $_)
                
    if($prop){
        [PSCustomObject] @{
            Number   = $_
            Property = $prop
        }
    }
}
$MediaFiles = '*.mp3', '*.wav', '*.wma'
$Directory = 'D:\Users\Public\Public.Language\Pronounce it Perfectly in Spanish 2e\Pronounce it Perfectly in Spanish 2e.Down.Load'

$Shell = New-Object -ComObject Shell.Application

foreach($type in $MediaFiles){
    $sample = Get-ChildItem -Path $Directory -Recurse -Include $type | Select-Object -First 1
    
    if($sample){
        $sample | ForEach-Object {
            $Folder = $Shell.Namespace($_.DirectoryName)
            $File = $Folder.ParseName($_.Name)

            1..512 | ForEach-Object {
                $value = $Folder.GetDetailsOf($file, $_)
                
                if($value){
                    [PSCustomObject] @{
                        File     = $sample.FullName
                        Number   = $_
                        Property = $Folder.GetDetailsOf($null, $_)
                        Value    = $value
                    }
                }
            }
        }
    }
}

star

Sun Nov 17 2024 18:28:17 GMT+0000 (Coordinated Universal Time) https://forums.powershell.org/t/how-to-find-metadata-is-available-from-file-properties/23751

#powershell #metadata #comobject #shell.application
star

Sun Nov 17 2024 18:27:01 GMT+0000 (Coordinated Universal Time) https://forums.powershell.org/t/how-to-find-metadata-is-available-from-file-properties/23751

#metadata #powershell #comobject #shell.application

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension