i/o error 183 really is "Directory already exists". Prior in my code I issued a {$I-} followed by a series of MkDir commands containing paths that Already exist. Since I forgot to perform IOResult following the MKDir, the error propageted into the next i/o call; or ReWrite. I/O Error 183 was actually occuring on the MkDir function call. A call to IOResult would have cleared it.....thanks to all.... alan
Main Topics
Browse All Topics





by: williams2Posted on 1998-04-03 at 01:46:46ID: 1361252
I have experienced your problem before. I solved it by setting the generel FileMode variable like this:
Procedure WriteFile(FileName: String);
var
F: File of text;
Begin
AssignFile(F,FileName);
//Valid FileMode values are:
//0 Read only
//1 Write only
//2 Read/Write
FileMode:= 2;
Reset(F);
Write(F,'Hello World');
CloseFile(F);
End;
The big problem is, that Delphi got severel levels of filehandling, and mixing them, can make influence to previous written and (almost) perfect working code. :-)
Regards
Williams