I believe there is a limit to the length of a value for a workflow variable, perhaps a better choice would be to create a temporary file containing the list of all these other files and set the task variable to point to that temporary file list.
TeamSite CSSDK has a WorkflowUtils.setLargeVariable() and WorkflowUtils.getLargeVariable() methods to create/update/retrieve variables larger than that.