Deleting tracks on a Creative Zen or Nomad
Sunday, June 15th, 2008So I’ve had a problem under ubuntu that maintaining my creative Zen’s music has been hard. I decided to copy my entire music collection onto my laptop, use Amarok to organise it and re-tag everything correctly, and then re-upload my music.
However, to do that I had to delete all of the music tracks on my nomad. Now Amarok and Gnomad seem fine for uploading music, and even downloading music, but deleting files seemed to continuously throw segmentation faults, and cause errors. I’m guessing this is a problem with the underlying libnjb library.
However the libnjb package has a libnjb-examples package, which includes an njb-deltr program, which deletes a single track. Combined with the njb-tracks client to get a list of all of the track id’s on the system, the following bit of Bash magic worked a treat:
./njb-tracks | grep "ID:" | cut -d' ' -f2 | while read track; do echo "Deleting track $track"; ./njb-deltr $track; done