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?
for a relative path it is interesting where the playlist is located. --> the paths are relative... relative to what? for sure the playlist! ;-)
track.flac
disc1/track.flac
../track.flac
-->../
stands for one folder up.../disk1/track.flac
the difference for absolute or relative paths are just the leading
/
!so... to combine all them together for your case, the correct relative path would be
../../Eminem/The EMINEM Anthology/074 - Patiently Waiting (ft. 50 Cent).opus
(if i'm right). ;-)--> but keep in mind changing the folder structure will in most cases also mess up relative playlists, except just renaming the playlist-folder(s).