Update Play Count in iTunes for Windows

ITunes 12.2 Apple Music logo

Last updated on March 1st, 2022 at 09:35 am

I lost the playcount in iTunes for Windows for some of my tracks.

Tonight I wanted to fix that without editing the Library.xml file – that’s too extreme. I envy Mac owners as they have wonderful Applescript collections to manage iTunes.

I found the awesome Liquid Parallax scripts but didn’t like manually editing the javascript file to set the new play count. So I hacked it together with some Windows Script Hosting magic to invoke a input dialog box in javascript. So the script now asks you to input the new play count.

Installation instructions for Adjust Play Count in iTunes for Windows:

  1. Download AdjustPlayCount.zip and unzip the contents somewhere on your drive. This will give you a 3KB file called AdjustPlayCount.wsf
    • Google Chrome doesn’t like wsf files and may block it with the message AdjustPlayCount.zip may be dangerous so Chrome has blocked it, you can use Firefox to download it or
    • go to your address bar and enter chrome://downloads/# 
    • then click KEEP DANGEROUS FILE
  2. Remember where you saved the script.

How to Adjust Play Count in iTunes for Windows:

  1. Select/highlight one or more songs in iTunes for Windows (use Shift+click or Ctrl+click to select more than one file). This can include the song now playing.
  2. Alt+Tab to your Windows Explorer window and double-click AdjustPlayCount.wsf
  3. Enter the desired new play count number in the dialog box.
  4. Click OK
  5. The script will reply with the new play count and number of files adjusted.

The script will update your iTunes for Windows play count for all the selected songs – even for the current playing song if you’ve highlighted it.

It worked for me on Windows XP and Vista Home using iTunes 10.0.1.22, as well as Windows 7, Windows 8, and Windows 10 and iTunes 12. In the comments, you’ll see it works with lots of combinations of Windows 7, 8 and 10 with iTunes 10+.

I provide no warranties for this script. Test it on one backed-up song first. If it kills your tunes, drinks your liquor or runs off with your daughters, it’s not my fault. You’ll see in the comments it has worked with thousands of files for others.

You can open the wsf file in a text editor to read the script if you want to see what it does.

Limitations:

  1. iTunes for Windows only. It kinda needs Windows to work.
  2. AdjustPlayCount does not check or force you to type an integer in the dialog box. I don’t know what will happen, but it can’t be good.
  3. I’ve tested it with 20 songs selected. I don’t know how it would perform if you selected 1,000 songs at once. Let me know, okay? *You’ll see in the comments it’s worked with thousands of files for others.

Suggestions, bug reports, questions and/or thanks in the comments. Maybe I could make it increase the play count by set number? Tell me what you think.

Bugs

iTunes Match vs. Play Counts: Every few years it seems that iTunes Match screws with Play Counts for some users in 2011, 2014, 2016, and 2017. It looks like iTunes 12.7.114 is doing it for one user below. Actually, it is iTunes Match that stops play count sync. It seems to be random and not all users are affected. If you use iTunes Match it may affect you. Suggested temporary fixes are to deregister the PC, reboot, fix the play counts, and then register the PC. That does not mean the problem will not return.

Updates

Update 28 February 2022: Still works in 2022 with Windows 10 and iTunes 12.12.2.2

Update 10 August 2021: Still works in 2021 with Windows 10 and latest iTunes 12!

Update 10 Jun 2019: The new Apple Music.app for MacOS is scriptable, but I’ll need to update the script if Apple decides to drop iTunes for Windows in favour of a Music for Windows app. In the meantime the script still works.

Update 24 March 2017: If you can’t download the file using Google Chrome browser because of its security settings, you can use Firefox to get the file or do the following

  • go to your address bar and enter chrome://downloads/# 
  • then click KEEP DANGEROUS FILE

Update 14 April 2013: I’m thinking of a checkbox that will also reset the last played date to today’s date. Again, let me know what you think.


68 responses to “Update Play Count in iTunes for Windows”

    • Thanks Mike250 it still seems a little clunky

      Every time I think of an improvement it seems like a major pain to keep generic. I was thinking of doing a script that sums the play count of all selected songs and updates them all to that sum. This would be good when I find duplicate songs. But then it would only be useful that first time.

  1. When I do this it says “Could not locate automation class named Itunes.Application” and it doesn’t update the count. I’m running Windows XP. Any help?

    • Hi Josh,

      What version of iTunes are you running? Generally that error means your iTunes is not fully/properly installed.

      On XP try reinstalling iTunes.

      On Vista try repairing the installation via control panel.

  2. A little late to the party on this one but just discovered this and needed to say a huge THANK YOU. You have saved my life (or well, saved me about 5 days worth of free time that it would have taken to reset all my play counts manually)

    Will be keeping a hold of this spectacular little program in case of any future iTunes disasters. Cheers!

    • Dave, thanks for your note, it made my day. Been a little short on wins recently.

      If you think of any way I can improve Adjust Play Count on iTunes for Windows, let me know. It’s pretty easy to tweak, but I don’t want to overload it with error-catching so it stays small and fast.

      Regards

      Paul

  3. Just want to say ahuge THANK YOU for your solution to Play Count. I tried a couple of other solutions before I came across yours and I wish I’d found you first. By far the easiest and quickest solution.
    Thanks

    • Thanks Jacqui

      Glad it worked for you. If you could share this page on Facebook or link to it from a website, I’d appreciate the promotion.

      What version of iTunes and Windows did you run it on?

      • Hi Paul

        It has worked until now, but we are now getting a Windows script error, any ideas why we would be getting this error? We are running Windows 7 and Itunes version is 10.7.0.21
        Kind regards
        Jacqui

  4. Great script. One suggestion: would it be possible to also update the Last Played field to be the date that you run the script?

    • David I could either put a checkbox to update the Last Played field to today or else I could put some sort of calendar pickbox into it, but that may create an error checking mess.

      What do you prefer?.

  5. Do you know how I can get the script to run as my AV, Panda AV Pro 2013, blocks it every time I and run it.

    • Try to add an exception in your Panda antivirus software for the script file or folder.

      • Open the Panda program window.
      • Click on the Antivirus module. A new window will open.
      • Within the newly opened window, there should be a Settings button for “Threats to detect and exclude”.
      • Add the script file or folder to the exclusions.

      Please let me know if this worked, as I don’t run Panda

  6. Hey, I’ve been looking for something like this…I remember finding one a few years back, not sure if it was yours or not, but it works the same.

    Anyway, I’m getting an error with the script. I’m on Win 8 x64 with iTunes 11 and it’s running with Windows Script Host when I try to open it. The dialog box comes up, I put in the number of plays and click okay, then it throws a dialog box with the following:

    Line: 48
    Char: 7
    Error “The track is not modifiable”.
    Code:A0040203
    Source: (null)

    Any idea what’s going wrong? Thanks!

    • Figured it out…the albums folder and files were read-only! Went to properties of the folder and unchecked read-only and it works! Thanks! Great script!

  7. Been looking for something like this for a LONG time. Finally found it. IT WORKS! THANK YOU!

    Windows 7 x64
    iTunes 10.7.0.21

  8. Thank so much for this! It works great 🙂

    I have been searching for a while, and this answers my problem perfectly.

    With a large number of songs, it works fine – it just takes a bit longer.

  9. This works really well for me (Windows 10 and iTunes 12.3.3.17). Thanks for putting it together!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.