Windows PowerShell script to unpack randomly named music files and places them in folders by artist/album/title. Script takes required input and output directory. For the input folder, it can have subfolders which the script will traverse.
π c:\temp\tunes
π F00
π· ADAN.m4a
π· BFVQ.mp3
π F01
π· ALSR.mp3
π· PTZX.m4p
π c:\music
π Anoushka Shankar & Karsh Kale
π Breathing Under Water
π· Sea Dreamer (feat. Sting).mp4
π Compilation
π An Austin Rhythm And Blues Christmas
π· Rockin' Around The Christmas Tree.m4a
π· (Rockin') Winter Wonderland.m4a
π· Boogie Woogie Santa Claus.m4a
> .\ unpackTunes.ps1 -musicSource C:\temp\tunes -musicDestination c:\music
#
# overwrite existing files
> .\ unpackTunes.ps1 -musicSource C:\temp\tunes -musicDestination c:\music -force
#
# remove the word "The" from artist name, such as "The Beatles" becomes "Beatles"
> .\ unpackTunes.ps1 -musicSource C:\temp\tunes -musicDestination c:\music -removeTheFromArtist -force
Parameter | Description |
---|---|
musicSource | Required folder or root folder for location of randomly named music files |
musicDestination | Required target folder to copy files to |
removeTheFromArtist | Remove the starting "The" from artist name, such as "The Beatles" becomes the "Beatles" |
force | overwrite existing files |