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:
- 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
- Google Chrome doesn’t like wsf files and may block it with the message
- Remember where you saved the script.
How to Adjust Play Count in iTunes for Windows:
- 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.
- Alt+Tab to your Windows Explorer window and double-click AdjustPlayCount.wsf
- Enter the desired new play count number in the dialog box.
- Click OK
- 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:
- iTunes for Windows only. It kinda needs Windows to work.
- 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.
- 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”
Works an absolute treat in iTunes 10.1.1.4 on Vista x64. Cheers mate!
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.
Works great with windows 10 64-bit and the latest iTunes 12.4.
Many thanks sir, a great little script.
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.
Itunes 10.4.80 on Windows 7?64
Thanks martin for the confirmation.
Thnx!! Works fine
I selected around 5800 songs.
Thanks xxpenholderxx 5800 songs. Wow! Glad to hear it worked that well. What play count did you set that many songs to?
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
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
Hi @Jacqui
iTunes 10.7 is new – I’ll have to look if they’ve changed anything.
Do you have a specific Windows script error?
Works nicely in iTunes 11 on Windows 8, managed to update several thousand tracks. Thanks 🙂
Works like a charm with iTunes 10.7.0.21 on my Windows 7 computer. Thanks, it?s a great little time saver!!
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?.
awesome, did just what i needed it to do. thanks!
Love it, works great. I’d also love it to update the Last Played field!
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?
Yes, please on the date last played addition!
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.
Please let me know if this worked, as I don’t run Panda
Yes that works thank you. Now to update all my tracks.
Thank you sooo much! It works flawlessly with iTunes 11.0.5.5 on Windows 8 x64! You rock!
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!
Oh man, you are godly, thanks so much, this is exactly what I’ve been looking for, working great on itunes 11
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
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.
After a few years of working perfectly, this script no longer works. I am currently running iTunes 12.1.0.71.
Aaron
I will have a windows box for a few days this week. I’ll check and update the script.
Hi Aaron
J.D Harper reported Update Play Count for Windows works with Windows 10 and iTunes 12.3.3.17. Do you want to try it again?
This works really well for me (Windows 10 and iTunes 12.3.3.17). Thanks for putting it together!
Great to hear that is still works @J.D.Harper. Is there anything you wish it would do differently?
Simple and works great. Thank you!
Thanks Soki
What version of Windows do you use?