I have a function in VB. that copies all files in a given folder to the itunes playlist.
The below function creats a playlist “puja” in itunes and
copies all songs from the folder c:Pujafolder to puja.
Public Function CopyAudioToiTunes()
PlaylistName = “Puja”
'Set iTunesApp = CreateObject(“iTunes.Application”)
Set iTunesApp = New iTunesApp
Set Albumplaylist = Nothing
Set Albumplaylist = iTunesApp.LibrarySource.Playlists.ItemByName(PlaylistName)
If Albumplaylist Is Nothing Then
Set Albumplaylist = iTunesApp.CreatePlaylist(PlaylistName)
MsgBox “Creating new Playlist” & Albumplaylist.Name
Dim AudioFilesArray(0) As String
AudioFilesArray(0) = “c:Pujafolder”
MsgBox (“Created playlists and added audio files to itunes.”)
The problem is everytime i add new audio files to the folder Pujafolder and call this function it copies all the files (the old and the new ones) . Is there a way to only copy those files which don’t exist in the current playlist.
Thanks in advance