R
royal666
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TFrmMain.FormActivate(Sender: TObject);<br>begin<br>{<br> FrmMain.borderstyle:=bsnone;<br> FrmMain.width:=0;<br> FrmMain.height:=0; }<br> ShowWindow(Handle, SW_HIDE);<br> if paramcount=3 then<br> begin<br> Case Paramstr(3) of<br> ' ' : if MessageDlg(目标文件已存在,是否覆盖?',mtWarning,[mbYes,mbNo],0) = mrNo then<br> exit<br> else DelAndCopyDir(Paramstr(1),Paramstr(2));<br> 'O' : DelAndCopyDir(Paramstr(1),Paramstr(2));<br> 'N' : exit;<br> end;<br> end;<br> If ParamCount < 2 then<br> Erreur('Use : CopyRep <dir Source> <dir Destination>')<br> else begin<br> if not DirectoryExists(ParamStr(1)) then Erreur('源文件不存在.');<br> if not DirectoryExists(ParamStr(2)) then Erreur('目标文件不存在.');<br> Label1.Caption := ParamStr(1);<br> Label2.Caption := ParamStr(2);<br> CopyDir(ParamStr(1),ParamStr(2));<br> end//;<br> else exit;<br>end;<br><br>