if dir("c:\test",vbdirectory)="" then
mkdir "c:\test"
end ifif dir("c:\test\test",vbdirectory)="" then
mkdir "c:\test\test"
end if这里没有装VB,你自已试一下吧
mkdir "c:\test"
end ifif dir("c:\test\test",vbdirectory)="" then
mkdir "c:\test\test"
end if这里没有装VB,你自已试一下吧
解决方案 »
- 我在代码中修改目录名,提示不让改,可能是有什么对象占用了目录资源,有什么办法可以查出来,是那个对象占用了资源?
- 用VB如何能进行监测windows对话框并关闭它?
- 一个小问题,请高手帮忙
- word强制留痕的vba代码是什么
- Winrar里面的Unrar来进行解压的疑问?
- 一个VB病毒设想
- 请问谁有用友华表做的例子?请给一个,谢谢!
- 在Windows2000下发生“0x77fcb1cf”指令引用的“0x004791b7”内存。该内存不能为“written”。
- API高手,我想你们啊!!
- 因为http://www.csdn.net/expert/topic/494/494474.shtm对我正要做的程序很有帮助,特此放分,bardo请进。
- 请问如何取得 1234XX:我爱你 中的1234XX?
- 有关TreeView的问题,急!
你应该以“\”为标志
将你的那个路径从左向有截取
判断那个目录是否存在
DIR(PATH)
如过不存在则用FSO创建
知道把整个路径的目录曾建立完毕
这是一个方法供参考
Private Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA" (ByVal lpPathName As String) As Long
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: [email protected]
'Create a new directory
CreateDirectoryEx "C:\Windows", "C:\KPD-Team", ByVal 0&
'remove the directory
RemoveDirectory "C:\KPD-Team"
End Sub
'写创建的代码
Next i