Thanks all
A tiny bit of background: Because the Windows path is fixed I have specified a file name for the m3u, PlayListStephen.m3u. It can only be in one place/path
?:\Sport Go\Music\PlatListStephen.m3u
However, in the Linux version, and so it can be used on any Linux computer the path/ is not known, so that file has to be selected.
Summary of problem: Because the file system of the mp3 player is FAT 32 the Linux version of the programme opens and writes to the m3u file, but the player cannot read the file content.
The Windows version works properly
I experimented with TstringLists:
procedure TForm1.BitBtn5Click(Sender: TObject); // Save
declared a TstringList
TListofsongs : TstringList;
Begin
TListofsongs := TStringList.Create;
Copied the global string, that contains the m3u path/filename.m3u, plus a #10, into a local string.
There is also a #10 at the end. It stops the programme writing to the m3u file.
Local string := global string
Localm3uPathFile := m3uPathFile;
Removed the #10
Tag := Pos(#10, Localm3uPathFile, 1);
Localm3uPathFile := copy(Localm3uPathFile, 1, (Tag-1));
Copied the content of the Memo to the TString.
TListofsongs.Add(Memo1.Lines.Text);
Amended the line endings
TListofsongs.LineBreak := '#13#10';
Write the Tstring to the m3u file
Tlistofsongs.SaveToFile(Localm3uPathFile);
I was surprised that no writing to the file took place. The file remained empty.
I was able to check that TListofsongs had content by copying it to a local string and using the local string for a caption
Listofsongs := TListofsongs.Text;
Label3.Caption := Listofsongs;
So what was to be written to the file was also output as a caption to a label
Now the two files idea
In Windows I used a new created notepad file and called it PlayListStephen.m3u. It was blank
I ran the Windows programme and opened the file and appended 3 songs. I exited the programme, removed the player and l used the playlist function to select and look inside the file. The list was complete.
I did the same procedure in Linux and called the file Lplist.m3u. After removing the player Lplist.m3u was visible as a playlist on the player but was empty. So I re-attached the player and used Kate to view Lplist.m3u. The content was correct.
I have attached both
Blimey this is a mammoth effort and thanks to all