Last active
July 7, 2016 07:43
-
-
Save vadyua/ed2cb541c50776978e46 to your computer and use it in GitHub Desktop.
Powershell script to strip Id3v1 tags from MP3s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
---------------- | |
Powershell script to strip Id3v1 tags from MP3s | ©2016 by (v) | |
---------------- | |
Uses Library: http://download.banshee.fm/taglib-sharp/2.1.0.0/taglib-sharp-2.1.0.0-windows.zip | |
#> | |
Param ( | |
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true,HelpMessage="Provide a full path to files")] | |
[ValidateScript({Test-Path $_ -PathType 'Container'})] | |
[alias("p")] | |
[System.String]$path | |
) | |
[Reflection.Assembly]::LoadFrom("C:\_path_\taglib-sharp-2.1.0.0\taglib-sharp.dll") | Out-Null | |
Get-ChildItem -LiteralPath $path -Recurse -Force -Filter "*.mp3" | %{ | |
$m = [TagLib.File]::Create($_.Fullname) | |
$m.RemoveTags([TagLib.TagTypes]::Id3v1) # TagTypes.Id3v1 && TagTypes.Id3v2 | |
$m.Save() | |
Write-Host "Striped Id3v1 from:", $_.Fullname | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment