怎样判断A驱是否准备就绪?并拷贝文件.(20分)

  • 主题发起人 主题发起人 6bytes
  • 开始时间 开始时间
6

6bytes

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样判断A驱是否准备就绪?
如果准备就绪,则把C:/A.TXT拷贝到A盘.


 
判断软盘是否准备好
 

类 别:文件操作

procedure TForm1.HandleMyException(Sender: TObject; E: Exception);
begin
if (E.ClassType.ClassName='EInOutError') then
begin
{do something great to (or for) the user}
MessageBox( Handle,'设备尚未准备好','错误',MB_OK or MB_ICONERROR);
end
else Application.ShowException(E); {let Delphi take it from here}
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnException := HandleMyException;
end;
--------方法2
If Not FileExists('a:/nul') Then
MessageBox(Handle,'请在A驱中插入软盘','',MB_OK)




2)用COPYFILE
 
接受答案了.
 
后退
顶部