Edit  "File Name Changer "  .............

 

procedure TFileNameChangerForm.FileListBox1DblClick(Sender: TObject);
var
 NewFileName : String;
begin
  //****** On the Form, Make a Button of Initialization - i and j  ************//
  AssignFile(F, FileListBox1.Items[FileListBox1.ItemIndex]);  // Assign File Handle
  if i < 9 then
     NewFileName := Trim('0'+IntToStr(i+1)+'. '+FileListBox1.Items[FileListBox1.ItemIndex])
  else
     NewFileName := Trim(IntToStr(i+1)+'. '+FileListBox1.Items[FileListBox1.ItemIndex]);
  Rename(F,NewFileName);
  FileListBox1.Update;
  inc(i);
  if i > j then
  begin
    ShowMessage('File Counter Exceed...!');
    i := 0;
  end;
end;