请教各位:我想创建c:\Documents and Settings\gaoyb\properties.txt?
    请问我该如何先判断该路径下的文件是否存在,若不存在则该如何创建该若径下的文件并往里写东西!

解决方案 »

  1.   

    if fileexists(c:\Documents and Settings\gaoyb\properties.txt) then
    使用
    else 创建
      

  2.   

    那么该如何创建呢是使用createFile(c:\Documents and Settings\gaoyb\properties.txt)吗?我定义了一个TextFile类型.如何使用它来操作这个文件
      

  3.   

    var
      MyFile:TextFile;
    begin
      AssignFile(MyFile,'c:\Documents and Settings\gaoyb\properties.txt');
      Rewrite(MyFile) //创建并打开一个文件
      //对文件其它操作
      CloseFile(MyFile)//关闭文件
    end;