Last active
March 8, 2019 18:05
-
-
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
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
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