Remove Duplicate Songs from Spotify Playlist

Spotify is a digital service which provides audio music, podcast, and video through an online portal which is available both through their official website and also as a standalone client.

Just like Windows Media Player’s trait of being extremely capable of handling all kinds of media files, Spotify can play media files, create playlists, import songs from other media players within its client such as iTunes, Windows Media Player and so on. This guide is will serve those users who wish to know how to remove duplicate content from their Spotify playlists.

 

Solution

This tutorial is primarily written for Windows 10 users. Even though it still might work for previous versions of Windows, depending on the version of Powershell client being used to remove the duplicate content. If the Powershell commands don’t work, simply use the alternative method mentioned at end of this tutorial as a substitute.

  1. Launch Spotify from the start menu.
  2. Login to its portal.

    Enter your login credentials
    Enter your login credentials
  3. Click on the desired playlist to look for duplicate content.
  4. Select a single music file from the playlist.
    image03
  5. Now use Ctrl + A to select all the tracks in the playlist.
  6. Right-click one of the highlighted tracks and then select Copy Spotify URI to copy all the URIs of the selected tracks.
  7. Open Notepad++ from the start menu.
  8. If you haven’t got Notepad++ installed in your system uptil now, download and subsequently install it from the following link:
    https://notepad-plus-plus.org/download/v7.3.html
  9. Paste all the copied URIs in Notepad++.
  10. Now save this in any location which has a short URL, as you will need to access this same location a little later and it will surely prove a lot easier than digging deep inside a hard drive.
  11. Open Windows PowerShell.
  12. Type out the following command in Windows PowerShell:
    image08
  13. This command basically retrieves the content from songs.txt where the Spotify URIs were saved in step # 10 (gc stands for get content), and it then sorts them out to bundle together the duplicate content through the sort-object command. And it makes use of the gu (get-unique) command to discard all the duplicate content and saves the result in the song_new.txt file which will be saved in exactly the same location as songs.txt. And obviously enough, the new file will be free from any duplicate content.
  14. Locate the songs_new.txt file and open it. Please note that it’s location will always be given after the gu command, it’s D:\songs_new.txt over here.
    image10
  15. Copy all the URIs from the text file.
  16. Now go back to Spotify and to the above-mentioned playlist in which you selected all the tracks in step # 5. Select all the tracks once again and then right-click on any selected track and select Remove from this Playlist. This will clear out the entire playlist.
  17. Now select any point of the blank area of the playlist.
  18. Press Ctrl + V keys on the keyboard to paste the copied URIs (step # 15) from song_new.txt to this playlist. This completes the duplicate cleanup operation via PowerShell at this point.
  19. If the PowerShell commands didn’t work out as you’re using an older version of Windows, then you should use this website to filter out the duplicate content:
    http://paulvi.nl/deduplicator/
  20. Select all the target tracks from the playlist and then drag and drop them to the designated (green) area.
  21. Click the DeDuplicate button.
  22. Once the process is over, drag and drop the remaining tracks to a new playlist on Spotify. Please remember that this whole procedure might take a really long time for a huge playlist. Another factor that might contribute in the time taken to remove duplicates is your Internet connection’s speed. Therefore the PowerShell method should always be recommended be preferred for being super fast, very simple and also it possesses no security risk at all as some of you must be concerned about the security aspect.

Warning: Undefined array key "author_box_bio_source" in /home1/clonefil/public_html/blog/wp-content/plugins/molongui-authorship/views/author-box/parts/html-bio.php on line 2

Raza Ali Kazmi works as an editor and technology content writer at Sorcim Technologies (Pvt) Ltd. He loves to pen down articles on a wide array of technology related topics and has also been diligently testing software solutions on Windows & Mac platforms. If you have any question about the content, you can message me or the company's support team.