Variable truncating when passing filenames processed into variable-VBForums
Results 1 to 1 of 1

Thread: Variable truncating when passing filenames processed into variable

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2017
    Posts
    1

    Variable truncating when passing filenames processed into variable

    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
    Last edited by dday9; Sep 13th, 2017 at 12:49 PM. Reason: Added Code Tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.