Source language: Translate to:

Multiple remote host FTP program

Questions about our File Management and Internet FTP plug-in

Multiple remote host FTP program

Postby David de Argentina » Tue Jun 11, 2013 1:26 pm

Hi Dave,

I have 6 different FTP Host accounts.
I'm trying to do a FTP program that allow copy Files and entire Folders between hosts.
In fact, all works fine.
As the main program is very difficult to read because the quantity of data i put into the screen, i'm trying to do an external client (a separated program) that does the following:

Code: Select all
StrParse "[CommandLine]" "[#13]" "[arg_]" "[cuantos]"

if "[cuantos]" "<>" "6"
  AlertBox "FTP Client" "Bad number of Arguments"
Else
  fmConnectRemote "Remote[arg_2]" "[arg_3]" "User=[arg_4];Password=[arg_5];Port=[arg_6];Passive=No;Timeout=60000;InitialPath=;LogLimit=0;KeepAlive=0"
  fmSetFileMask "Remote[arg_2]" "*.*"
  fmSetRootDir "Remote[arg_2]" "/"
  fmShowFileBrowser "Remote[arg_2]" "Rectangulo1"
  fmSetFileBrowserProperties "Remote[arg_2]" "RowSelect=No;ShowHiddenFiles=Yes;ShowCheckBoxes=No;ThumbnailHeight=64"
  fmSetHeaderColumnWidths "Remote[arg_2]" "Name=150"
Endif


I call this program, called "Client" with the following action placed on the Connect Button of the ConnectDialog CustomWindow.

Code: Select all
Run "[Pubdir]Client" "[HostNum][#13][Host][#13][Account][#13][Password][#13][Port]" "Normal" "" ""


Note the [HostNum] variable is an autoincrement to compose the Connection ID value.

In fact, each time i create a new connection, the Connection Dialog works fine, an a new instance of the "Client" program is created with a new FTP Site. All fine.

But, when i try to drag a file or a folder to an another "Client" instance ( another FTP host ) I receive a "File not Found" message error.

Are there any way to correct this ?

Thanks in advance,
David de Argentina

PS: I know i can do it using custom windows into the main program. but if i do this, i limite the quantity of remote hosts according the quantity of CustomWindows i create. Using an external program the quantity is unlimited.
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Multiple remote host FTP program

Postby Neosoft Support » Tue Jun 11, 2013 5:03 pm

Dragging remote files between two separate apps won't work because both the sending and receiving connection need to be able to communicate with each other during the transfer. Since the connections are essentially opened by different applications, they can't communicate. The only thing that might work would be to download the files from one server to a temporary file first, then tell the other app to upload the temp file to the second server. That's kind of what FM/FTP does in the background when transferring between two remote connections.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Multiple remote host FTP program

Postby David de Argentina » Tue Jun 11, 2013 5:47 pm

Thanks Dave,

You wrote:
"The only thing that might work would be to download the files from one server to a temporary file first, then tell the other app to upload the temp file to the second server. That's kind of what FM/FTP does in the background when transferring between two remote connections."

That means the connection between servers is indirect, triangulating with a non-visible local host, isn't it ?

Thanks again,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Multiple remote host FTP program

Postby Neosoft Support » Wed Jun 12, 2013 9:37 am

That means the connection between servers is indirect, triangulating with a non-visible local host, isn't it ?


Yes. This method is slower, but works with all types of servers.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookFM/FTP

Who is online

Users browsing this forum: No registered users and 1 guest

cron