mkdir 的i/o错误,在执行Reset(F);出现
procedure TFrmOpts.Button1Click(Sender: TObject);
var
F: TextFile;
i: Integer;
tempStr,s,APath,path: String;
FSearchRec : TSearchRec;
FindResult: Integer;
Sl: TStringList;
begin
path:=ExtractFilePath(application.ExeName);
path:=path+'\RecordFile';
MkDir(path);
Sl := TStringList.Create;
APath := '.\RecordFile\';
FindResult := FindFirst(APath+'*.DDT',faAnyFile,FSearchRec);
Try
While FindResult =0 do
begin
Sl.Add(RightStrb(Lowercase(FSearchRec.Name),'.',0));
FindResult := FindNext(FSearchRec);
end;
Finally
FindClose(FSearchRec);
end;
for i := 0 to Sl.Count -1 do
begin
tempStr :='.\RecordFile\'+Sl[i]+'.ddt';
AssignFile(F, tempStr);
Reset(F);
Readln(F,S);
CloseFile(F);
end;
end;