11-19-2022, 09:12 PM
Remy, thanks again for your patience. I struggle with things that are not in my skillset. I'm attaching the Log file (myerrors.txt)that I received when running my programon the office server. I've also added the log file when running from my home office (success from home.txt). The office uses a tp link router that has 2 wan sources ATT & T-Mobile. The owner wants the T-Mobile source to be dominant because it's way faster and to use ATT for failover. If I disconnect T-Mobile the program runs just fine. I've discovered that there are a lot of people who are having trouble with ftp over T-Mobile's modem. I have no idea as to how to cause the tp-link router to switch to ATT when this program runs. I've finally included the code for GetRemoteFilenames which seems to be where it fails at the office.
void __fastcall TSendFTP::GetRemoteFilenames()
{
dbFTP->List(NULL,"",true);
int lr = dbFTP->ListResult->Count;
String anItem,filename;
TLog->Clear();
for (int i = 0; i < lr; i++ )
{
anItem = dbFTP->ListResult->Strings[i].Trim();
if (BW("type=file",anItem))
{
filename = ExtractFilename(anItem);
TLog->Add(filename);
}
}
}
void __fastcall TSendFTP::GetRemoteFilenames()
{
dbFTP->List(NULL,"",true);
int lr = dbFTP->ListResult->Count;
String anItem,filename;
TLog->Clear();
for (int i = 0; i < lr; i++ )
{
anItem = dbFTP->ListResult->Strings[i].Trim();
if (BW("type=file",anItem))
{
filename = ExtractFilename(anItem);
TLog->Add(filename);
}
}
}