unit Unit1;
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, FileCtrl;
type
TForm1 = class(TForm)
Label1: TLabel;
Button1: TButton;
Button2: TButton;
DirectoryListBox1: TDirectoryListBox;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
RenameFile (label1.Caption,'C:\dir2');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
RenameFile ( 'C:\dir2',label1.Caption);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
DirectoryListBox1.DirLabel := Label1;
end;
end.
Znaci zamisao(sada samo primer)je da se folder dir1 uspomoc
directoryList-a(znaci prosto receno misem izaberes folder kolji ces
preimenovati u drugi, u ovom slucaju ) promeni u C:\dir2
Da li je ovo moguce, znaci izaberem folder koji hocu da preimenujem i kliknem na button?!
Veliko hvala na pomoci!