Ist doch garnicht schwehr ...
Delphi-Quellcode:
Procedure TMain.Create ...
var i:integer;
begin
for i := 1 to paramcount do
begin
if FileExists(paramstr(i)) then
begin
// es ist eine Datei und nicht /irgendwas
if uppercase(EXTRACTFILEEXT(ParamStr(i))) = '.MP3' then AddMP3(ParamStr(i));
if uppercase(EXTRACTFILEEXT(ParamStr(i))) = '.M3U' then AddPlaylist(ParamStr(i));
end;
end;
end;
[EDIT]
for i := 1 to paramcount -1
in
for i := 1 to paramcount
geändert ...
-1 ist in diesem Fall falsch ...