Hi Martin, thanks for your reply.
I want to get the number of files in the directory, then download the files with the specific prefixes. But it fails because of the incompatible types when i try to run on server.
My method continues like that:
..
fileCount = List.get_Count();
for(i = 0;i < filecount; i++)
{
lists.empty();
packedList = conNull();
files = list.get_Item(i);
strlist = files.ToString();
lists=strSplit(strlist,',');
iterator = new ListIterator(lists);
if(iterator.more())
{
packedList += iterator.value();
iterator.next();
}
prefix = subStr(conPeek(packedList,1),6,7);
if(prefix == "SKA_" || prefix == "SKS_")
{
fileName = subStr(conPeek(packedList,1),6,30);
targetFile = System.IO.Path::Combine(myPath,fileName);
memStream = new System.IO.FileStream(targetFile,System.IO.FileMode::Create);
asyncResult = cliente.BeginDownloadFile(fileName, memStream);
cliente.EndDownloadFile(asyncResult);
memstream.Close();
cliente.DeleteFile(Filename);
}
}
..