1: DIR ()
2: MKDIR
3: DIR()
4:有很多中办法无法一一写出来了

解决方案 »

  1.   

    if dir(yourpath,vbDirectory)<>"" then
    存在
    else
    不存在
    end ifmkdir yourpath   '建立一个文件if dir(yourpathfile)<>"" then
    存在
    else
    不存在
    end if新建一个文件要根据文件类型来决定建立的方法。
    新建一个文本文件的方法:
    open "c:\abc.txt" for loutput as #1
    print #1,"abc"
    close #1
      

  2.   

    前面新建文本文件的代码有误,现改正。if dir(yourpath,vbDirectory)<>"" then
    存在
    else
    不存在
    end ifmkdir yourpath   '建立一个文件if dir(yourpathfile)<>"" then
    存在
    else
    不存在
    end if新建一个文件要根据文件类型来决定建立的方法。
    新建一个文本文件的方法:
    open "c:\abc.txt" for output as #1
    print #1,"abc"
    close #1