以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  为何执行后不建立file文件夹呢  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=65706)

--  作者:a937775799
--  发布时间:2015/3/20 20:25:00
--  为何执行后不建立file文件夹呢
If FileSys.DirectoryExists( ProjectPath + file ) Then FileSys.CreateDirectory(ProjectPath + file)
我这个代码在afterOpenProject中为何执行后不建立file文件夹呢
[此贴子已经被作者于2015/3/20 20:56:06编辑过]

--  作者:a937775799
--  发布时间:2015/3/20 20:29:00
--  
 自己在帮助里面找到了ProjectPath。。。
--  作者:a937775799
--  发布时间:2015/3/20 20:41:00
--  
 Dim file As String  = "file"
If FileSys.DirectoryExists( ProjectPath + file ) Then FileSys.CreateDirectory(ProjectPath + file)
我这个代码在afterOpenProject中为何执行后不建立file文件夹呢,
不再afterOpenProject里面 在别的按钮里面也不能新建
[此贴子已经被作者于2015/3/20 21:10:14编辑过]

--  作者:程兴刚
--  发布时间:2015/3/20 21:16:00
--  
If FileSys.DirectoryExists(ProjectPath & file) = false Then
    FileSys.CreateDirectory(ProjectPath & file)
end if

--  作者:a937775799
--  发布时间:2015/3/20 21:16:00
--  
 哎呀 。。我靠逻辑出问题了,,昏

--  作者:程兴刚
--  发布时间:2015/3/20 21:19:00
--  

如果您没有事先定义file变量,则应该这样:

 

dim file as String = "文件夹名称"

If FileSys.DirectoryExists(ProjectPath & file) = false Then
    FileSys.CreateDirectory(ProjectPath & file)
end if