pbuddy2007
Technical User
I'm trying to create a routine that will upload the conent of a folder to a webserver using a FTP connecttion....the problem is that it works on one server but doesn't on my new hosting server
1- The FTP intitial directory after login is the root "/" directory
2- yes the ftp account has all the privileges
3-
1- The FTP intitial directory after login is the root "/" directory
2- yes the ftp account has all the privileges
3-
Code:
Dim i As Long
Dim sError As String
Dim strFullPath As String, strRelativeName As String, strRelativePath As String
Dim objFTP As ASPFTP
Dim strMsg
Dim profilenum As Integer
Dim tdesign As String
Dim wsh
'On Error Resume Next
Set wsh = CreateObject("WScript.Shell")
PathLogInit
LogPath App.Path & "\output\site1", strFNAMES, lngPptrs, strPaths
'create reference to object
Set objFTP = New ASPFTP
objFTP.sServerName = "1.2.3.4"
objFTP.sUserID = "user"
objFTP.sPassword = "pass"
If objFTP.bConnect() Then
objFTP.bMakeDir "public_html\site3"
For i = 0 To UBound(strFNAMES)
strFullPath = strPaths(lngPptrs(i)) & strFNAMES(i)
strRelativeName = GetRelativeName(strFullPath)
strRelativePath = GetRelativePath(strFullPath)
strRelativePath = "\public_html\site3" & strRelativePath
strRelativeName = "\public_html\site3" & strRelativeName
'now make the directory
Label5.Caption = "Creating folder " & strRelativePath & vbCrLf
DoEvents
objFTP.bMakeDir strRelativePath
Label5.Caption = "Copying file " & strRelativeName & vbCrLf
DoEvents
objFTP.bPutFile strFullPath, strRelativeName
Next i
Set objFTP = Nothing
else
'error code
end if