Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Import Songs into iTunes Playlist in Correct Order Apps
When you drag multiple files from a folder into an iTunes playlist, iTunes usually doesn't keep them in the proper order. I've found that if you just drag the folder itself into the playlist, it does keep them in the correct order. I usually delete any non-music files from the folder before I import.

[kirkmc adds: It's true that iTunes doesn't keep individual tracks in order when you add them by dragging, unless your playlist is sorted by album and the tracks are tagged with the appropriate track numbers. Also, you don't need to worry about removing non-music files, unless the folder contains videos (in formats that iTunes understands) or PDFs; iTunes simply ignores these other files.]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[31,050 views]  

Import Songs into iTunes Playlist in Correct Order | 8 comments | Create New Account
Click here to return to the 'Import Songs into iTunes Playlist in Correct Order' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Import Songs into iTunes Playlist in Correct Order
Authored by: billabOng on Oct 01, '07 08:35:45AM

If your directory has a .m3u file, you should remove it before you drag it into iTunes.. Otherwise, you will end up with duplicates. I believe you could just double-click the .m3u to add the tracks to iTunes as well.



[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: boredzo on Oct 01, '07 09:01:42AM

It's true that iTunes doesn't keep individual tracks in order when you add them by dragging, unless your playlist is sorted by album and the tracks are tagged with the appropriate track numbers.

It probably doesn't do it then, either. Remember, the order the songs have in the playlist is not the same as the order they're displayed in, if you have iTunes set to show the playlist with a sort. If you want to view the actual (unsorted) order, click on the very far left column in the table header.



[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: aca on Oct 12, '07 07:37:16PM

When dragging things from the finder into other apps (e.g., into an iTunes playlist), the order that you get depends on what view option you have your Finder window set to. If it's in column view, they should be added in alphabetical order. If it's list view, they come in some other order, which I've never been able to predict precisely (it depends somewhat on the order in which you selected the items, but there's also some other variable that I've never figured out) This "feature" has been around since the first version of OS X, I'm not sure if it's intentional or a bug...
When I drag things from the finder into iTunes, I always switch to column view first, so it's at least in alphabetical order.



[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: twang on Oct 15, '07 09:06:47PM
Yeah, this problem annoyed me to no end. I keep my songs sorted by date added, so I hobbled this together. There is probably a better way, but it works like a charm... It lets you drag on a folder, and it sorts then by name and adds them successively ever 2 seconds. you hear the first second of each track as it plows through, opening each, and each is copied to the library.
on open theFolders
	repeat with theFolder in theFolders
		set folderInfo to info for theFolder
		if the folder of folderInfo then
			importAlbum from theFolder
		else
			set folderName to displayed name of folderInfo as string
			display dialog folderName & " is not a folder."
		end if
	end repeat
end open

on importAlbum from theFolder
	tell application "Finder"
		set theSongs to every item of theFolder
		set theSongs to sort theSongs by name
	end tell
	repeat with theSong in theSongs
		set songName to the name of theSong
		set songFile to theSong as text
		set songTitle to getSongTitle from songName
		if songTitle is not false then
			--say "Importing song " & songTitle
			open theSong
			delay 2
		else
			--say "Skipping file " & songName
			delay 1
		end if
	end repeat
end importAlbum

--filter the songName to mp3's only
on getSongTitle from songFileName
	set songTitle to false
	if songFileName contains "mp3" then set songTitle to songFileName
	return songTitle
end getSongTitle


[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: Baby Bloc on Jan 14, '11 11:19:39PM
This worked pretty well for me. I did change the script to make it wait longer between imports. Just changed the "delay 2" to "delay 6." And the "delay 1" to delay 6."

I think iTunes is trying to import stuff alphabetically, but sometimes gets messed up when tracks take too long to start (long tracks, etc) and it gets one out of order once in a while. (This happens to me when I manually click on tracks to import them "in order." When I do it too fast, iTunes can't always keep up and puts a shorter one out of order before a longer one.)

So, I changed the script to add that longer wait, and then I saved it as an Application (that was important), and now I can drop folders from the finder into the application icon wherever I put it. It works pretty good. Thanks for that, it's bugged me for a long time.

I'm not sure if the "delay 6" will work with all tracks. I may have to mess with it if I'm doing some albums with really long and short tracks.

[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: soundsgoodtome on Oct 20, '07 02:51:56PM

I don't find any of these tips or methods to be fail-safe. Even with tracks whose names begin with track numbers, there seems to be no reliable way to get them to import in proper consecutive order.

I just tried setting a folder of tracks to column view, as suggested above -- and the tracks are also named sequentially -- but each time i drag the folder into itunes, the tracks are imported in some random order.

If these various methods are working 100% of the time for those who posted them, there must be other factors that come into play.

I typically keep iTunes sorted by "date added," so i can quickly see the items I've added most recently at the top. While sorted in that manner, I've found the only way I can add an album and have it play in order (without having to create a separate playlist) is to add the songs individually, starting with the highest-numbered track, and working backwards. But that's tedious, so I usually create a playlist of the album and sort by album or track number (which are essentially the same).



[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: ptilol on Nov 18, '07 05:54:27AM
If your files are numbered (Imean, in the filename), I found an easy way to solve that with Automator.

Create an Automator process that

- Gets the selected files in the Finder (Finder section)
- Sorts the files (Finder section)
- Adds them to a playlist (iTunes section). Choose the Library playlist.

Then, I use http://dougscripts.com/itunes/scripts/scripts09.php?page=5#albumizeselection to number the freshly added files.

Maybe it also works without pre-sorting the files in case your filenames are not numbered but listed in the correct order in the Finder (by which magic?). I did not try that.

Let us know if it is a good start for your problem.

Cheers, PtiLol

[ Reply to This | # ]
Import Songs into iTunes Playlist in Correct Order
Authored by: sloveall on Jan 06, '11 01:04:13PM

When using Add to Library from iTunes, be sure the order in folder is the order you want (column view), and when prompted for the folder to add, Option-click on the folder you wish to add to your library. The order should be maintained as displayed in the finder.

Especially useful for things like audio books or course-work that contain sequential content.



[ Reply to This | # ]