怎么用vb在远程创建文件夹啊?!

来源:百度知道 编辑:UC知道 时间:2024/05/26 00:40:23
一下是vb6工程测试代码,网上找的:
Private Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
Private Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type
Public Sub CreateNewDirectory(NewDirectory As String)
Dim sDirTest As String
Dim SecAttrib As SECURITY_ATTRIBUTES
Dim bSuccess As Boolean
Dim sPath As String
Dim iCounter As Integer
Dim sTempDir As String
Dim iFlag As Integer
iFlag = 0
sPath = NewDirectory

If Right(sPath, Len(sPath)) <> "\" Then
sPath = sPath & "\"
End If

iCounter = 1
Do Until InStr(iCounter, sPath, "\") = 0
iCounter = InStr(iCounter, sPath, "\")
sTempDir = Left(sPath, iCounter)
sDirTest = Dir(sTempDir)
iCounter = iCo

估计是lz是属羊的。。强人一个。

用vb使用winsock在server写一个本地的。在client发送一个调用即可。

日!那有你这样的啊!用ie访问是:http://127.0.0.1:8888/test
是特定没权限写文件的。要都你这样那不我访问www.baidu.com然后我给他乱创建一堆文件夹 那百度不就完了?这个是没权限的,你非要这样你用FTP。然后给写的权限。或者用 WebService.我的意思是FTP和WebService都能让远程访问用户去创建文件夹,至于具体怎么弄你自己去查查啊