Thanks. In that case, I'll plump for a different permissions issue. Might also explain why iTunes was reluctant to do certain updates by itself.
Right-click on your main iTunes folder and click Properties, then go to the Security tab and click Advanced. If necessary grant your account and SYSTEM full control of this folder, subfolders and files, then tick the option to replace permissions on child objects which will repair permissions throughout the library. This is the XP dialog but Windows 7 shouldn't be too different.
If it won't let you change the permissions use the Owner tab to take ownneship from an account with administror privileges.
Or there could be yet another factor involved...
I *think* I've done this, although the set up was a little different - still the same problem.
Also, although I keep giving myself the 'child objects' permission (and a little tab comes up asking me if I'm sure I want to), when I go out and then click back into properties the box seems to be unticked again. GRRR!
The "Replace permission entries..." box is expected to be cleared each time you view that dialog. When you tick it and press OK you're then telling the OS to reset the permissions on every file and folder inside the one you're working with. That should be a one time repair.
The fact that you still get that error might be bringing us full circle. Maybe iTunes thinks some of the files have images, but they don't, which is why it doesn't bother to fetch new art for them. Because iTunes thinks there is an image my script will attempt to archive it for the purpose of copying it back in, and will fail because there isn't an image to export.
This bug hunting lark is all so much easier when can you test out a new bit of code every couple of mintues, and add in all extra reports just before the failure.
I shall leave you to get on with fixing up your artwork and take what I've learnt for the next time.