Dim Path As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) '获得到我的文档路径 Dim FolderName,FolderName1 As String For Each Folder As String In FileSys.GetDirectories(Path) '获得我的文档中的子目录 if Folder.Contains("管理项目") Then FolderName = FolderName & Folder & "|" '得到狐表默认管理项目文件夹 FolderName1 = FolderName1 & Folder End If Next '笨办法,本来想用Trim删除"|"符号直接获得长度,可Trim不听话 Dim Name1 As String = "管理项目" & FolderName.Length - FolderName1.Length + 1 Dim Name As String = InputBox(Path & "\" & Name1 & "-:special:1:-, "创建项目",Name1) '用户自定义项目名称 if Name <> "" Then FileSys.CopyFile(ApplicationPath & "Catch\Foxtable.Blank.Table",Path & "-:special:1:- & Name & "-:special:1:- & Name & ".table",True) '创建项目 Dim Proc As New Process Proc.File = Path & "-:special:1:- & Name & "-:special:1:- & Name & ".table" Proc.Start() '运行新创建的项目 End If