Tuesday, October 20, 2009
Creating BlackBerry Playlist in C#
I dont have the Media Sync plugin for the Blackberry installed on my laptop yet so I wrote up few lines to create the playlist quickly.
Copy all your music to your blackberry and run the following script in a ASP.NET application.
protected void Page_Load(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
foreach (FileInfo file in new DirectoryInfo("YourDriveLetter:\\BlackBerry\\music\\Media Sync\\<Your music folder path>").GetFiles())
{
sb.Append("file:///SDCard/BlackBerry/music/Media%20Sync/<Your music folder path>/"+ HttpUtility.HtmlEncode(file.Name));
sb.Append("<br/>");
}
Response.Write(sb.ToString());
}
There you have it.
Labels: BlackBerry, C#, Music