I want a playlist to refer to a relative file path, so I can copy it to my mobile phone or any future drive and it will still work.
The playlist is located in /home/gratis/Music/Hip-Hop/50 Cent/The Very Best Of 50 Cent/11 - Patiently Waiting (ft. Eminem).m3u
, and its entries are:
#EXTM3U
#EXTINF:286,Eminem - Patiently Waiting (ft. 50 Cent)
/home/gratis/Music/Hip-Hop/Eminem/The EMINEM Anthology/074 - Patiently Waiting (ft. 50 Cent).opus
So, that's basically two directories up from where it's located -> Eminem -> The EMINEM Anthology -> music file.
I replaced /home/gratis
with ..
, and tried Mark Kirby's suggestion (replacing /home/gratis
with ~
), but neither of those attempts worked. How can I make these paths relative and/or portable?
~
is just a synonym for$HOME
which is a variable for/home/username
so a absolute path remains... this just works for other users with the same paths.