When I export a playlist and then open in excel, do whatever sorting I want, I then save the file and reimport into itunes but not all the songs are there. It appears to be from "comma's" in the song name. Any solutions?

I see songs such as "Monday, Monday" or "Paint It, Black" or even the artist name such as "Fireballs, with Jimmy Gilmer" which have comma's in them, being a problem when I try to do the following:


1. Export a playlist which contains songs which are all there and play fine, but some have comma's in the title such as listed above.

2. I then open that file in Excel and bring it in as a Tab-delimited file. Everything lays out fine, and all the songs are thing (including those with comma's).

3. I then sort the varoius fields I want (which I can't do in i-tunes because i-tunes won't sort it properly), and resave the file as a newly named file, which is also a .txt file.

4. I then import that playlist into my itunes. It is exactly the same songs that I just had exported but i-tunes says some of the songs can't be found.


I have traced this problem to comma's in the file name of the song such as listed above. There must be a solution to this either as the file is opened in excel or in how it's saved or some other solution short of having to rename song/artists without using comma's.


Thanks.

Posted on Aug 31, 2011 8:41 AM

Reply
57 replies

Sep 1, 2011 12:09 PM in response to William Richards3

William Richards3 wrote:


If you click the "number" column (as your suggestion in smart playlists) you can resort the order in a playlist you create even after clicking a different column.


I'm working but will check your script ASAP. Can't wait!


Thanks. Cheers!

Yes, yes, but if you sort the playlist on another column, say Album by Artist, then you can't manually reorder the tracks until you switch back to sorting on the initial number/play order column.


tt2

Sep 1, 2011 6:39 PM in response to turingtest2

Hi,

Before I tried your script, I created a playlist with about 20 titles in it that had no dates in the comment section. I thought I should see how it would work. So I entered in a variety of dates using the YYYY/MM/DD format. It sorted "better" when I clicked the items column for Comments, but it still put things in order such as:


User uploaded fileUser uploaded fileUser uploaded file

As you can see for 2002 for example, it put Jan 1 first as it should, but then went to November 11 (because it had two one's 11) and then May 5, so it still isn't sorting exactly as hoped. For 2004 you'll see that November (11) is coming up before July (7). For these few titles it wouldn't be so bad, but if I'm doing hundreds or even thousands of songs using your script, it would take more manipulation. This is definitely helpful as it at least gets it into the right "year" sequentially, but before I run your script, is that what the outcome would be as well? Or does your script somehow do something else more intuitively so a sort such as above would come out better. Or did I do something wrong in my test entering? I would assume what I see above is what it would look like after your script ran, no?


I've not run it yet as I want to see what your reply is to this. I really appreciate your help and look forward to hearing back. Cheers!

Sep 1, 2011 6:59 PM in response to turingtest2

A quick update; I ran your script using about 400 songs. It ran well until the final 3 tracks or so. It threw an error so I just selected those 3 songs again and ran your script again and got the same error.User uploaded file

There is nothing unusual about these three songs except they were the final ones being selected. And as per my previous message in which I tried this on my own before running script and got the sort problems, your script showed the same though it was interesting to see songs that were out of order that didn't seem to follow the numbered order one would expect. For example, 1965/1/30 comes before 1965/1/6. Anyway, this will definitely help if I decide to go in this direction. I can at least drag & drop a bit easier than the problem I have with commas with a text delimited format when trying to export and then back into itunes using playlists. I sincerely appreciate your help here. Any ideas on how we could get closer? I can't export to excel because I'll have the same missing files because of the comma issue. Thanks!!


User uploaded file

Sep 1, 2011 7:05 PM in response to William Richards3

Oops, in checking I noticed that the three songs not working with your script were songs that were in i-tunes but whose files were not there, meaning itunes couldn't play it. Remember I said I was doing this testing on a different computer so I must not have copied over a few titles at some point with this older computer. So your script is 100% fine it appears, it was just "operator error" on my end. Hope you can solve the next dilemma to get sorting to be in proper order. .

Sep 2, 2011 7:32 AM in response to turingtest2

Much thanks. Wonderful to communicate with someone who is so nice and helping someone just because they want to help.


I'll give this new script a try. I didn't think about putting in the leading zeros when I did my testing but that makes sense. And yeah, if the script does that additionally and can then sort properly, that's a great accomplishment you've made.


I'll let you know. Thanks!

Sep 3, 2011 9:16 AM in response to William Richards3

I've tracked down the reason for your original issue.


When you round trip an exported playlist through Excel and back again any fields that contain commas are surrounded by double quotes even when using tab as the delimiter. Basicaly what I was proposing as a potential fix earlier on instead turns out to be the problem! 🙂


I reckon my script represents a better workflow for you, but if you need to use Excel in the future, run the resulting file through something like Notepad++ first to strip out the redundant quotes before importing to iTunes.


tt2

Dec 15, 2011 10:26 AM in response to turingtest2

Hello,


I just wanted to say thank you again for helping me out with this a few months ago. I am just now getting around to getting it applied to all my library of 15,000+ songs. I tested things on another machine and know your solution worked, so now I just have to refresh myself with our exchange. I did wnat to say thank you again!


I have another quick question for you; I have a song with all the data in it, including the comment fields where I put the dates for chart position such as "12/07/1979". If I want to create a newer conversion of that song (where I take the original wave file and convert it to 320 mp3 or even apple lossless, instead of the original 160 that I did on my songs early on), when I copy that song over the original, everything copies, but it doesn't keep the "comment field" so I have to do that manually. It would be nice to find a work around so that if I replace a song in the folder the original is residing in, that it would keep that. I have no idea why that doesn't work to copy everything. Also, it seems like the playlists that the song was in also is lost.


So it keeps all the main data (artist, title, album, track number, etc), but the comment field and playlists it's in, appear to be lost. Any suggestions?


And finally, how do I put a positive comment on your previous help so it's added to the community that you are excellent?


Thanks!

Dec 15, 2011 11:36 AM in response to William Richards3

Hello again.


Sounds like it's time for another script. I can't see a good reason for not copying over the comments field if all the other tag info. gets copied over, though I suspect if I look hard there are probably other fields omited too. My SortDateAdded script already has a routine that preseves and restores all fields (that can be restored) for .wav files, including playlist membership, so it should serve as a good starting point. Instead of removing the file and then adding it back to the library (which is what it currently does) it needs to do something like this: For each selected file, initiate a file conversion, on completion copy over the missing original track details and insert into playlists. That should work well enough for generating new copies at the selected bit rate. Tidying away the old ones automatically might be a little harder. Do all these files reside in the same folder or do you have a master folder with the .wavs separate from the main iTunes Media folder?


If you can work out which of the posts in this thread qualify as Correct or Helpful then you can, if you wish, press the appropriate buttons, or you could "Like" a particular post. The thread starter (you in this case) gets to award one correct worth 10 points, and/or up to two helpfuls (5 points) per thread. Anybody can "Like" a post (except their own), no points arise.


tt2

Dec 15, 2011 11:47 AM in response to turingtest2

You're amazing. I wish I had this much success/response from Kaspersky (tech support is awful). Anyway, I took a brief look at your sortDateAdded script when I clicked the link. Here's what I generally do:


1. Copy the file I am replacing to a different folder so I preserve the original in case something happens.

2. I then copy over the new, higher quality version (same file name such as "Beatles - Hey Jude.mp3"). It asks if I want to copy over it and I say yes.

3. Then I go into itunes and everything is correct except that the "comments field" (where I put the chart date, per our initial exchange), is lost. It may lose other fields as you said, but I haven't noticed any others. It also, I believe, loses all the playlist data that file resides in which is a REAL bummer, as I have 400+ playlists.


Does that help? I would say that 98% of my files in i-tunes, which are mp3, started as .wav files, and I have these original wave files so that I can convert up to a higher baud rate. I started this music burning project probably 7-8 years ago and anticipated that hard-drives would get larger and larger (and ipods as well, though it appears we're stuck with the 160 gb being the largest, and now the Cloud is the new push). Anyway, I can convert much of my library to larger/better file quality but do keep mp3 as the main one, though I know apple loss type is probably better. I just find mp3 to be more universal with other things so I'd like to get more of my titles to 320. Still, I am limited on ipod space as I am already out of room (I have movies also on it which take up a lot of space).


On a side note, do you know of any software (which would then work in itunes) that allows ID3 tagging onto wave files? I'd like to create an entirely separate itunes library (different computer) which would be wave-based. However, it's impossible to manage and do things as I can do with ID3 tagging with mp3 files, so I've not done that yet. And I have a number of FLAC 96/24 and higher rates that I've purchased such as Beatles USB drive version (on Amazon) which are higher-end quality. Won't play in i-tunes, so I have to use Media Monkey, which works fine.


Thanks!

Dec 15, 2011 12:37 PM in response to William Richards3

Are you saying the original files aren't also in the iTunes library you are working with? How do the converted files get any initial values for their tags? Do you do the conversion in a separate library or with something other than iTunes?


I don't think I quite understand the work flow yet. iTunes gives each file in its library a unique ID. Playlists are just lists of those IDs. If you physically replace a 160k copy of a track with 320k copy of the same track with the same filename, then the replacement track automatically remains part of the same playlists and iTunes barely notices that anything has happened (in fact you'll probably have to work hard to get it notice the change in bit rate). If you delete say, a 160k .mp3 via Windows Explorer and replace it with an Apple Lossless version, attempt to Get. Info for the track and select the replacement when asked to locate the missing file then the same sort of thing occurs. If however you remove one track, and add another, even if they have all the same tag information, the new file won't appear in any regular playlists. It will appear in the same albums and the smart playlists as the original except, where applicable, for those based on format or bit rate.


If the playlists are all based around your current "lower" quality versions then the pseudo code I gave earlier won't quite do it. Any other clues that could be used by a script? iTunes doesn't expose the file's path to smart playlists but a script can read it and extract meaning if it is there.


No, I don't know of anything that can add tags to .wav files though I gather it is technically possible. However since most media players don't expect to be able to read a tag from a .wav file, my guess is they don't look for them. In the long run preserving the details of the .wav files library is always dependent on you being able to preserve the database and media library as a whole. Any loss of the database would be fatal. See this backup tip. My personal suggestion would be to standardise on Apple Lossless for the high quallity long term archive/listen at home library and produce downsampled versions as you need them for your devices. Again I take it the 128k ACC generated on the fly wouldn't satisfy you.


Are the original .wav files in a set of parallel playlists anywhere? One trick would be to use the Grouping field to hold one or more playlist names and then build smart playlists around that field. Converted files would then automatically be members of the correct playlists and in a destroyed library disaster the crucial info. would already be in the tag.


tt2

Dec 15, 2011 1:11 PM in response to turingtest2

Sorry for any confusion. Let me put it this way: I have an itunes library full of songs. Those songs obviously reside on the hard-drive in folder(s). I put them into a drive other than the "C" drive so that I can more easily carry them from one computer to the other if need be. So those songs have been imported to, and reside in, i-tunes. So let's say I have a song such as "Beatles-Hey Jude.mp3" which is a 160 buad file. I also have the .wav version of this same song on a different drive. But that song hasn't been imported to i-tunes, it's only there to archive and use later if I want. So now I want to update this 160 baud rate file to say 320. I convert the song from its .wav original and it saves to a different hard drive. So far;


1. Original song is in itunes and a folder on that drive that it knows where it is.

2. Wave file on a different HD

3. I convert this .wav to a higher-end mp3 file and save that conversion to a different HD than either the .wav or where i-tunes is.

4. I then copy the original song (#1 on the list) to a different folder to make sure I keep the original itunes file unchanged.

5. I then copy the new convereted file (#3 on the list), over the existing song (#1).


Then when I go into itunes, the file plays fine, and is in the new, higher quality version. However, it loses the "comments" field, and I believe the playlists it was in (I can double check - I'm doing this from memory as I've not done this in awhile).


Again, I am not likely going to convert to Apple format as those won't play on CD MP3-ready car stereos, and such.


Does this help?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

When I export a playlist and then open in excel, do whatever sorting I want, I then save the file and reimport into itunes but not all the songs are there. It appears to be from "comma's" in the song name. Any solutions?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.