- ©«¤l
- 109
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 114
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7 Win10
- ³nÅ骩¥»
- Office 2019 WPS
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ²`¦`
- µù¥U®É¶¡
- 2013-2-2
- ³Ì«áµn¿ý
- 2024-11-6
|
¥»©«³Ì«á¥Ñ Joforn ©ó 2020-11-5 23:33 ½s¿è
- Private Function FTPFolder(ByVal Url As String, _
- Optional ByVal UserName As String, _
- Optional ByVal PassWord As String, _
- Optional ByVal Port As Integer) As Object
- Dim objShell As Object
-
- If Len(Url) Then
- If Len(UserName) Then Url = UserName & ":" & PassWord & "@" & Url
- If Port > 0 Then Url = Url & ":" & Port
- Set objShell = CreateObject("Shell.Application")
- Set FTPFolder = objShell.Namespace("FTP://" & Url)
- End If
- End Function
- Sub Test()
- Dim objFolder As Object
- Dim objItem As Object
-
- Set objFolder = FTPFolder("0.0.0.0", "username", "password")
- If Not (objFolder Is Nothing) Then
- For Each objItem In objFolder.Items
- Debug.Print "Name=""" & objItem.Name & """ Size=" & objFolder.GetDetailsOf(objItem, 1) & " ModifyDate=" & objFolder.GetDetailsOf(objItem, 3)
- Next
- End If
- End Sub
½Æ»s¥N½X |
|