Sub Start_Upload
MyPath = File.DirRootExternal & sRoot & "/" & sJobNo & "/" & sReportType & "/" & sCustID
MyFTPPath = "Inspections/" & sJobNo & "/" & sReportType & "/" & sCustID
MyUploadFile = sDefItem & ".jpg"
If (FTP.FileOrFolderExist(MyUploadFile, MyFTPPath, False)) = False Then
FTP.MakeDir("Inspections")
FTP.MakeDir("Inspections/" & sJobNo)
FTP.MakeDir("Inspections/" & sJobNo & "/" & sReportType)
FTP.MakeDir("Inspections/" & sJobNo & "/" & sReportType & "/" & sCustID)
FTP.UploadFile(MyPath, MyFTPPath, MyUploadFile)
End If
End Sub
Sub FTP_FileExist(Found As Boolean)
Dim Answ As Int
If Found Then
Answ = Msgbox2("Item " & sDefItem & " already excists. Do you want to replace it?","File Excists","Yes","","No", Null)
If (Answ = DialogResponse.POSITIVE) Then
FTP.UploadFile(MyPath, MyFTPPath, MyUploadFile)
End If
If (Answ = DialogResponse.NEGATIVE) Then
FTP.Close
End If
End If
End Sub