/unpackTunes

Unpacks certain randomly named music files and places them in folders by artist/album/title

Primary LanguagePowerShellMIT LicenseMIT

unpackTunes.ps1

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.

Sample input folder

📂 c:\temp\tunes
   📂 F00
     📷 ADAN.m4a
     📷 BFVQ.mp3
   📂 F01
     📷 ALSR.mp3
     📷 PTZX.m4p

Sample output folder

📂 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

PowerShell command prompt examples

> .\ 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

Parameters

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