by jayshah » Mon Jan 18, 2010 8:53 am
Starlionblue,
I know you already went the iphone route but I figured I'd post this for anyone else that has the backberry sync issue. I use to have a bb curve, then went to a iphone, then went back to blackberry (for a bunch of reasons, but mainly the keyboard). Right now I have the black berry bold 2 (9700) and I'm really liking it. Even though the media player on it has come a long way, it still has the playlist sync issue (pathing, not saying its a blackberry thing, just a incompatibility with the way mm dumps out playlists to it). Not being able to have my playlists irritated me so much that I just sat down and leaned some vbscript to figure it out. I had a couple of requirements (as other people have posted about) like it should be simple, quick and one step to run, nothing complicated. I used vbscript because its native to all windows system, no need for special software or anything. Its quick and dirty but it does the job, pretty well. So now, I just sync my device and then run this .vbs from the command line (you can also just double click it), and all the playlists get fixed. I've also added some checks, so that it won't error out, like no playlists in the directory. It also won't touch any lists that are already "fixed" (something else someone posted somewhere else on the board). If anyone needs anything special in the script, let me know.
What I would love if the MM team would either code this into a dll or whatever, or just give an option to post execute a file after a sync (eliminating the need for me to run it form the command line).
All you have to do is copy this code into a file, change the "E:\" to whatever drive letter your blackberry sdmicro card shows up as (I use the cable and connect the bb directly to my laptop but it should be the same if you use a usb to sd readed) and then save the file as a .vbs Make sure you tell the sync to put the playlists in the root of the music folder (I believe this is the default), although if you want to change that you can just change the PlayListsLocation value to match. Sync your device, then just run the code. Tada...
Code: Select all
Const ForReading = 1
Const ForWriting = 2
PlayListsLocation = "E:\BlackBerry\music\"
OldPath = "\BlackBerry\music\"
NewPath = "\SDCard\BlackBerry\music\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set PLFolder = objFSO.GetFolder(PlayListsLocation)
set PLFiles = PLFolder.Files
for Each x in PLFiles
If InStr (LCase(x), ".m3u") And (x.size > 0) Then
Set objFile = objFSO.OpenTextFile(x, ForReading)
PlayList = objFile.ReadAll
objFile.Close
If Instr (PlayList, NewPath) < 1 Then
PlayList = Replace(PlayList, OldPath, NewPath)
End If
Set objFile = objFSO.OpenTextFile(x, ForWriting)
objFile.Write PlayList
End If
Next
Starlionblue,
I know you already went the iphone route but I figured I'd post this for anyone else that has the backberry sync issue. I use to have a bb curve, then went to a iphone, then went back to blackberry (for a bunch of reasons, but mainly the keyboard). Right now I have the black berry bold 2 (9700) and I'm really liking it. Even though the media player on it has come a long way, it still has the playlist sync issue (pathing, not saying its a blackberry thing, just a incompatibility with the way mm dumps out playlists to it). Not being able to have my playlists irritated me so much that I just sat down and leaned some vbscript to figure it out. I had a couple of requirements (as other people have posted about) like it should be simple, quick and one step to run, nothing complicated. I used vbscript because its native to all windows system, no need for special software or anything. Its quick and dirty but it does the job, pretty well. So now, I just sync my device and then run this .vbs from the command line (you can also just double click it), and all the playlists get fixed. I've also added some checks, so that it won't error out, like no playlists in the directory. It also won't touch any lists that are already "fixed" (something else someone posted somewhere else on the board). If anyone needs anything special in the script, let me know.
What I would love if the MM team would either code this into a dll or whatever, or just give an option to post execute a file after a sync (eliminating the need for me to run it form the command line).
All you have to do is copy this code into a file, change the "E:\" to whatever drive letter your blackberry sdmicro card shows up as (I use the cable and connect the bb directly to my laptop but it should be the same if you use a usb to sd readed) and then save the file as a .vbs Make sure you tell the sync to put the playlists in the root of the music folder (I believe this is the default), although if you want to change that you can just change the PlayListsLocation value to match. Sync your device, then just run the code. Tada...
[code]
Const ForReading = 1
Const ForWriting = 2
PlayListsLocation = "E:\BlackBerry\music\"
OldPath = "\BlackBerry\music\"
NewPath = "\SDCard\BlackBerry\music\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set PLFolder = objFSO.GetFolder(PlayListsLocation)
set PLFiles = PLFolder.Files
for Each x in PLFiles
If InStr (LCase(x), ".m3u") And (x.size > 0) Then
Set objFile = objFSO.OpenTextFile(x, ForReading)
PlayList = objFile.ReadAll
objFile.Close
If Instr (PlayList, NewPath) < 1 Then
PlayList = Replace(PlayList, OldPath, NewPath)
End If
Set objFile = objFSO.OpenTextFile(x, ForWriting)
objFile.Write PlayList
End If
Next
[/code]