none
MFT in asp.net RRS feed

  • Question

  • Hi, Can any body please help me out on MFT using asp.net ?  sample posts would be good enough..

    Below is the sample code in vb script the same thing i have to implement in asp.net

    Function MFTUploadForex()
    'Transfer WPDExchangeRate.csv to DBMS via MFT
    Call addLog(Now & ": Batch :" & dtStartTime & " : Start MFT File transfer for : " & uploadExchange)
    strMFTFileName = objStartFolder &"\"& uploadExchange
    strMFTProgram = strMFTProgramPath & " part=" & strpart &", fname=" & strMFTFileName &", nfname=" & uploadExchange & ", idf=" & stridf & ", parm=" & strParm
    Call addLog(Now & ": Batch :" & dtStartTime & " : MFT Command line " & strMFTProgram)

    If Err.Number <> 0 Then 
    Call addLog(Now & ": Batch :" & dtStartTime & " : Error detected before MFT: " & Err.Description)
    Call emailNotification("Error with MFT Murex Transfer", "Error detected before MFT. Please check log file for details")
    Err.Clear 
    End If

    Call addLog(Now & ": Batch :" & dtStartTime & " : Sending File " & uploadExchange)
    set objShell = createobject("Wscript.Shell")
    objShell.Run "C:\Windows\system32\cmd.exe /c "& strProfile & " && " & strMFTProgram & " >>" & strCFTLogFile ,1, False


    If Err.Number <> 0 Then
    abouterr = Err.Description
    srcerr = Err.Source
    numerr = Hex(Err.Number)
    Call addLog(Now & ": Batch :" & dtStartTime & " : Error detected after MFT : " & numerr & " " & abouterr & " Source: " & srcerr)
    Set objShell = Nothing
    Err.Clear 
    End If

    Call addLog(Now & ": Batch :" & dtStartTime & " : Successfully Sending File : " & uploadExchange)

    End Function

    Saturday, January 31, 2015 10:13 AM

Answers