I am calling the vbscript below from an FTP application that looks for files and moves them. I am passing into a vb variable the filenames as they are being processed by the task. Then print the variable in an email. when I try to print that variable in an email it is getting truncated around 8220 bytes.
Basically as the files are transferred the file names (myOnlyName) are stored in to variable myOnlyNames. myOnlyNames is passed to the email in application to be displayed. myOrigName(s) is another variable that we can use to remove filename extension, but that isn't relevant to this is task.
Code:
Dim myDelim
Dim myOrigNames
Dim myOrigName
dim myOnlyName
dim myOnlyNames
Dim myFileCounttmp
myDelim = vbcrlf
myOrigName = MIMacro("[OrigName]")
myOnlyName = MIMacro("[OnlyName]")
myOrigNames = Trim(MIGetTaskParam("OrigNames"))
myOnlyNames = Trim(MIGetTaskParam("OnlyNames"))
myFileCounttmp = MIGetTaskParam("FileCount")
if myOrigNames = "" then
MISetTaskParam "OrigNames", myOrigName
MISetTaskParam "FileCount", myFileCounttmp + 1
else
MISetTaskParam "OrigNames", myOrigNames & myDelim & myOrigName
MISetTaskParam "FileCount", myFileCounttmp + 1
end if
if myOnlyNames = "" then
MISetTaskParam "Onlynames", myonlyName
else
MISetTaskParam "OnlyNames", myOnlyNames & myDelim & myOnlyName
end if