kvk1989 2 Posted April 9, 2022 hi , how can add file path ? i"m making a project procedure TForm1.scGPButton8Click(Sender: TObject); var i: Integer; partname, storage: string; strsize, endsize, sz: string; begin if cb.ItemIndex = 0 then begin end; if (Firehose = '') then begin Showmessage('Firehose not found'); exit; end; SearchPort(cbb1); if cbb1.Items.Count > 0 then cbb1.ItemIndex := 0; if (not Pos('9008', cbb1.Text) > 0) then begin Showmessage('Port qualcomm not detected '); exit; end; Screen.Cursor := crHourGlass; Port := Getport(cbb1.Text).Trim; adlg('Scanning port ', 0, 0); adlg('Qualcomm HS-USB QDLoader 9008' + #13, 0, 1); adlg('Connect ', 0, 0); adlg(Trim(cbb1.Text) + #13, clTeal, 1); adlg('Initialize ... ' + #13, 0, 0); if (not EmmcDlInfo(Port)) then exit; adlg('Serial ', 0, 0); adlg(info.serial + #13, 0, 1); adlg('MSM ID ', 0, 0); adlg(info.msmid + #13, 0, 1); adlg('PKHASH ', 0, 0); adlg(info.hash + #13, 0, 1); adlg('SBL ID ', 0, 0); adlg(info.sblid + #13, 0, 1); adlg(#13, 0, 1); application.ProcessMessages; if (cbb2.ItemIndex = 0) then // storage combo storage := 'emmc' else storage := 'ufs'; adlg('Storage Type ', 0, 0); adlg(uppercase(storage) + #13, 0, 1); application.ProcessMessages; adlg('Processing ', 0, 0); case cboOperation.ItemIndex of 0: // read info begin end; 1: // factory reset begin end; 2: // frp begin adlg('Erasing FRP ' + #13, 0, 1); EmmcDlErase(Port, storage, Firehose, 'frp'); EmmcDlErase(Port, storage, Firehose, 'config'); adlg(' Erase ', 0, 0); adlg(partname, 0, 1); adlg(' ( ' + strsize + '-' + endsize + ' ) ...', 0, 0); end; end; application.ProcessMessages; adlg('Rebooting ... ', 0, 0); EmmcDlReboot(Port); end; i want to add file with file path like this if combobox.itemindex =0 then begin firehose loader file with file path end; thanks Share this post Link to post
David Heffernan 2345 Posted April 10, 2022 I can't understand the question at all Share this post Link to post
PeterBelow 238 Posted April 10, 2022 21 hours ago, kvk1989 said: hi , how can add file path ? i want to add file with file path like this if combobox.itemindex =0 then begin firehose loader file with file path end; thanks The System.IOUtils unit contains a number of helpers to work with files in general. The TPath record has methods to build a path, dissect a path, find system folders etc. Share this post Link to post