Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DaWe35/f3a4360b9aaaeca99abe1e1b90b8140f to your computer and use it in GitHub Desktop.
Save DaWe35/f3a4360b9aaaeca99abe1e1b90b8140f to your computer and use it in GitHub Desktop.
This script repairs the mp3 music file names downloaded from Vubey.yt. Run it on Windows PowerShell
cd C:\Users\USERNAME\Music\Rename
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match "_"} | foreach {
$New=$_.name.Replace("_"," ")
Rename-Item -path $_.Fullname -newname $New -passthru
}
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match "-Vubey"} | foreach {
$New=$_.name.Replace("-Vubey","")
Rename-Item -path $_.Fullname -newname $New -passthru
}
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match " Official Music Video"} | foreach {
$New=$_.name.Replace(" Official Music Video","")
Rename-Item -path $_.Fullname -newname $New -passthru
}
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match " Official Audio"} | foreach {
$New=$_.name.Replace(" Official Audio","")
Rename-Item -path $_.Fullname -newname $New -passthru
}
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match " Official Mix"} | foreach {
$New=$_.name.Replace(" Official Audio","")
Rename-Item -path $_.Fullname -newname $New -passthru
}
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match " Extended Remix"} | foreach {
$New=$_.name.Replace(" Official Audio","")
Rename-Item -path $_.Fullname -newname $New -passthru
}
dir -recurse | where {-Not $_.PsIscontainer -AND $_.name -match " Extended Mix"} | foreach {
$New=$_.name.Replace(" Official Audio","")
Rename-Item -path $_.Fullname -newname $New -passthru
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment