var s:string; i:integer; begin s := 'http://www.trucmuche.com/truc.exe'; for i:=0 to length(s) do if copy(s,i,1)='/' then s:=copy(s,0,i-1)+'\'+copy(s,i+1,length(s)-i); SaveDialog1.FileName := ExtractFileName( s ); showmessage( SaveDialog1.FileName ); end;
function ExtractNomDeFichierDeURL(Value:String): string; var s:string; i:integer; begin s := Value; for i:=0 to length(s) do if copy(s,i,1)='/' then s:=copy(s,0,i-1)+'\'+copy(s,i+1,length(s)-i); Result := ExtractFileName( s ); end;