Update Play Count in iTunes for Windows

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 hard-drive. This will give you a 3KB file called AdjustPlayCount.wsf
  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 doubleclick 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

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 can open the wsf file in a text editor to read the script if you want to see what it does.


  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?

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.

Update 14 April 2013: I’m thinking of a checkbox that will also reset the last played date to todays date. Let me know what you think.

43 Replies to “Update Play Count in iTunes for Windows”

    1. 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. IM running Windows XP. Any help?

    1. 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!

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



  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.

    1. Thanks Jacqui

      Glad you 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?

      1. 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
        Kind regards

  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?

    1. 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?.

    1. Hi Travis I could either put a checkbox to update the Last Played field to today or I could put some sort of calendar pickbox into it, with lots of error checking.

      What do you think?

  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.

    1. 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”.
    Source: (null)

    Any idea what’s going wrong? Thanks!

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

  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. I’m gonna try this later.

    I forgot to back up my iTunes library (not music files, they’re all safe in external HDD) when I reformatted my PC so I thought I lost my playlists built for over a decade. Looks like I can rebuild again thanks to Rocket Player, listFix, m3u8 playlists to back up from my phone, and now this script.


Leave a Reply

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