home *** CD-ROM | disk | FTP | other *** search
- unit Unit6;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls;
-
- type
- Tren = class(TForm)
- Label1: TLabel;
- Label2: TLabel;
- Edit1: TEdit;
- Button1: TButton;
- Button2: TButton;
- procedure Button2Click(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- ren: Tren;
- f:File;
- s,gdd:String;
-
- implementation
-
- uses unit1;
- {$R *.DFM}
-
- procedure Tren.Button2Click(Sender: TObject);
- begin
- close;
- end;
-
- procedure Tren.Button1Click(Sender: TObject);
- begin
- s:=label1.caption;
- if edit1.text<>'' then
- Begin
- AssignFile(f,s);
- rename(f,edit1.text);
- End;
- getdir(0,gdd);
- Form1.filelistbox1.directory:='c:\';
- form1.filelistbox1.directory:=gdd;
- close;
- end;
-
- end.
-