'create index.html in internal dir
Writer.Initialize(File.OpenOutput(File.DirInternal, "index.html" , False))
Writer.WriteLine (FinalHtml)
Writer.Close
Log ("index file created.")
'connect to ftp
FTP.Initialize("FTP", FtpServerName, 21, FtpUser, FtpPass)
FTP.PassiveMode=True
Dim sf As Object = FTP.SendCommand ("MKD", NewDir)
Wait For (sf) FTP_CommandCompleted (Command As String, Success As Boolean, ReplyCode As Int, ReplyString As String)
FTP.SendCommand("MKD", NewDir)
' Wait For (FTP_CommandCompleted(serverpath)) complete (flag As Boolean)
' Wait For FTP_CommandCompleted (Success As Boolean)
'
'
FTP.UploadFile(File.DirInternal, "index.html", True, NewPath)
' Wait For (FTP_UploadCompleted(FtpServerName)) complete (success As Boolean)