Invert to Basename strip filename
hi i'm hoping to remove a filename from a filename path
dcop amarok player path
displays
/mnt/music/Complete albums/Green Day - Unplugged/Green Day - 07 - When I Come Around.mp3
'basename "$(dcop amarok player path)"
strips the folder and displays
Green Day - 07 - When I Come Around.mp3
but i'm hoping to strip it to this for a amarok script
/mnt/music/Complete albums/Green Day - Unplugged/
and hopefully take capture just the extension also
the spaces in the directory has complicated things little for me
cp "$(dcop amarok player path)" "/mnt/music/Complete albums/Green Day - Unplugged/"0"$(dcop amarok player track)"\ -\ "$(dcop amarok player artist)"\ -\ "$(dcop amarok player title)".mp3
#copy/rename playing track in format track - artist - title.extension
|