Writer.Initialize(File.OpenOutput(File.DirInternal, "index.html" , False))
Writer.WriteLine (FinalHtml)
Writer.Close
Log ("index file created.")
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)
FTP.UploadFile(File.DirInternal, "index.html", True, NewPath)