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”
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.
Godspeed.
Hi chibuki
We’ve all experienced a library loss so I feel your pain. Hopefully my script with help you rebuild your iTune play counts
iTunes 12.5.4.42, Windows 10 x64. Updated play count on 1900 files, and on a network drive too. Many thanks!
Thanks for the feedback @Mr Larrington, I’ll hopefully update the plugin in 2017 with a few more features now that I have access to a Windows machine again.
This worked perfectly. Thank you so much!
It works perfectly and I had not question asked when downloading it. Thanks, it was very useful.
hey, I used the script and it worked but when my itunes connected to icloud laterthe play count reset to the original value. Now it keeps on resetting so my play count for those songs is broken. Anyway to undo this?
Hi @kenith What version of Windows and iTunes are you using?
That way I can check it.
It seems like you said you’re backing up/restoring iTunes to iCloud?
I thought that was an iPhone setting in Settings>iCloud i.e. you back up your phone to iTunes or iCloud not both.
Hi,
Thx for the speedy response.
I’m using itunes version 12.7.1.14 on a Windows 7 pc. I have an itunes match subscription so itunes connects to the cloud if I’m not misstaken to upload/match new songs.
Hi thanks for giving me some more info. I’ll look into the match subscription. I suspect there’s an updated setting that needs to be adjusted.
Yes it’s a bug on Apple’s side with iTunes Match. Doug’s AppleScripts for iTunes mentioned it last year and it was a problem Apple’s forums in 2011 and 2014 (oops!).
https://dougscripts.com/itunes/2016/04/play-counts-bug/
I keep getting an error message for some songs :
It happens only with this one particular album from a Japanese artist (artist name in Japanese characters + English, song titles all in English). Some songs work, some not.
I’m on Windows 10 with the latest itunes.
That error message is because the script does not have rights to edit the metadata in the track. That metadata is embedded in the mp3. So in file browser locate the track then, right-click > properties and fix the permissions for the file.
Another possibility is that the script is failing on the Japanese characters. Let me know if the permission fix works first. Also paste the Japanese + English file name in a comment here and I’ll test it’s handling of UTF-16 characters.
You are a lifesaver — I had my counts adjusted when I had to reload damaged files (hundreds). Since I use play counts for smart playlists, this sucked. Your script worked perfectly just now in 12.9.0.167 — thank you!
This worked perfectly. Thank you!
Thank you so much! This still works in 2020 with Windows 8.1 and latest iTunes.
[…] Bắt đầu bởi tải xuống kho lưu trữ có chứa tập lệnhvà giải nén nó đến một vị trí bạn thấy thuận tiện. Không cần thêm phần […]
Still works in 2021 with Windows 10 and latest iTunes! Cheers, thanks so much for the time saved and easy instructions.
Thanks for the update @nicnac. Glad it’s working
[…] http://zagz.com/update-play-count-itunes-windows/ 에서 대화 상자가있는 업데이트 된 버전을 작성했습니다 .Chrome 은 압축 된 […]
Still works in 2022 with Windows 10 and iTunes 12.12.2.2 — thanks!
Great to hear. In this age of streaming I still use my song library as some of my music isn’t available on the platforms I’m subscribed to. That worries me about the long term accessibility of music that isn’t in the top 2080 pop songs per year.
Works with Windows 11 and iTunes 12.12.3.5 too, thanks!
Seems to work In Win 11 and iTunes 12.11.4.1, except that, when I run it against a smart playlist, I sometimes get an error message at the end: Line 44, Char 6, The playlist has been deleted, Code A0040202, Source (null).
Seemed to update the playlist counts just fine, though, and no playlists were deleted or otherwise harmed, as far as I can tell!
I’m surprised smart playlists work at all. But I think they just serve a list of files to the script so it works until the end of file, which doesn’t exist.
Thanks for the feedback.
it is working in windows 10 and itunes 12.12.8.2
[…] Начните с скачиваем архив со скриптом и извлеките его в удобное для вас положение. Никакого […]
Was there ever a fix for the apple music version on windows? Forced to use this unfortunately.
Last check was if you use the script to update your play count and Apple Music accepts the sync, you should be good.
Guy. in case you’re monitoring the site, I’ve replied, but as you’ve put a fake email address*, you probably won’t see this.
No need for fake email addresses on this blog as I’m not asking you to sign up for anything.
If you tick one of the two Notify me… boxes when you leave a comment, you may get an email, though probably not as the modern internet stops most server generated emails from getting through.