Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Declare Function FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA" _
(ByVal hFtpSession As Long, ByVal lpszExisting As String, ByVal lpszNew As String) As Boolean
Private Declare Function FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA" _
(ByVal hFtpSession As Long, ByVal lpszExisting As String, ByVal lpszNew As String) As Boolean
Function FTPRename(ByVal HostName As String, _
ByVal UserName As String, _
ByVal Password As String, _
ByVal ExistingFileName As String, _
ByVal NewFileName As String) As Boolean
On Error GoTo Err_Function
' Declare variables
Dim hConnection, hOpen, hFile As Long ' Used For Handles
' Open Internet Connecion
hOpen = InternetOpen("FTP", 1, "", vbNullString, 0)
' Connect to FTP
hConnection = InternetConnect(hOpen, HostName, INTERNET_DEFAULT_FTP_PORT, UserName, Password, INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0)
' Change Directory
'Call FtpSetCurrentDirectory(hConnection, sDir)
' Open Remote File
Call FTPRenameFile(hConnection, ExistingFileName, NewFileName)
' Close Internet Connection
Call InternetCloseHandle(hOpen)
Call InternetCloseHandle(hConnection)
FTPRename = True
Exit Function
Err_Function:
MsgBox "Error in FTPRename : " & Err.Description
Exit Function
End Function
FTPRename InternetDomainName, UserName, Password, Existing File Name Inclunding Path , Existing File Name Inclunding Path
Call FTPRenameFile(hConnection, ExistingFileName, NewFileName)
FTPRename = True
FTPRename = FTPRenameFile(hConnection, ExistingFileName, NewFileName)