command line random "Can't establish connection"

Core FTP client questions and answers
Locked
n88n
Posts: 3
Joined: Tue Aug 28, 2018 2:42 pm

command line random "Can't establish connection"

Post by n88n »

So i recently bought a new computer and moved a VB.net program to this new computer. my program uses coreftp to transfer some files up to my webserver. On the new computer i randomly get some files that do not transfer up to the server. My program transfers one file at a time with the following command line call and each call for each file. An average instance will move about 11 files by making the following call 11 times just changing the file name. Any ideas why this used to work but now does not? Sometimes is works great and sometimes it misses 3 or 4 files.

"c:\program files\coreftp\coreftp.exe" -s -O -site 520 -u "D:\Data\xxxxxx\xxxxxxxxx.com V2\site\machines\photos\1998_Mori_Seiki_SV500_40_08282018-6.jpg" -p /xxxxxxxxx.com/machines/photos/ -log d:\Data\core.log

here is what the log says when it fails

Can't establish connection --> ftp.xxxxxxxxxx.com:21 @ Tue Aug 28 09:33:46 2018
(0-5)Can't establish connection --> ftp.xxxxxxxxxxxxxx.com:21 @ Tue Aug 28 09:33:46 2018
(0-5)Connection FailedConnection FailedTotal uploaded files: 0

Total uploaded data: 0

Total downloaded files: 0

Total downloaded data: 0

Total uploaded files: 0

Total uploaded data: 0

Total downloaded files: 0

Total downloaded data: 0
ForumAdmin
Site Admin
Posts: 1001
Joined: Mon Mar 24, 2003 4:37 am

Re: command line random "Can't establish connection"

Post by ForumAdmin »

it might be connectivity issues with the computer itself (drivers, network card, other background programs that use excessive resources, etc).

Use corecmd.exe instead of coreftp.exe and check the return value. If it is not zero then retry the transfer.
n88n
Posts: 3
Joined: Tue Aug 28, 2018 2:42 pm

Re: command line random "Can't establish connection"

Post by n88n »

just for more information i also use the CoreFTP program and that never seems to fail when i grab and stack of files and transfer them.

I will give your suggestion a try and see if i can capture the return value.
ForumAdmin
Site Admin
Posts: 1001
Joined: Mon Mar 24, 2003 4:37 am

Re: command line random "Can't establish connection"

Post by ForumAdmin »

those aren't corecmd.exe return values. Are you looking at %errorresult%?
n88n
Posts: 3
Joined: Tue Aug 28, 2018 2:42 pm

Re: command line random "Can't establish connection"

Post by n88n »

I was collecting the wrong value. i looked up another way to fire off the command line and test the return. I am not sure why it is failing but i retry the upload a couple of times if it fails. It seems to be working ok now. Thanks for pointing me in the right direction.
Locked