WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> FTP TO IP ADDRESS
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1112126222

Message started by cdacey on Mar 29th, 2005 at 8:57pm

Title: FTP TO IP ADDRESS
Post by cdacey on Mar 29th, 2005 at 8:57pm
I am trying to use the sample FTP bat file to ftp a file to a site that uses an ip addresses with a port number.  Can this be accomdated.  As example I tried using xx.xx.xx.xx:#### in the FTP site name area, but it did not seem to work (x is numbers in ip and # is port numbers digits).  Any ideas.
Thanks

Title: Re: FTP TO IP ADDRESS
Post by Gert on Mar 30th, 2005 at 4:50am
Hello,

It is possible to do this, but it requires some extra changes to the .bat file. The trouble is caused by the port number which is not correctly parsed when passed on the command line.

To get this to work, change this line:

Code (]SET FTPSERVER=ftp.yourserver.com
[/code):


to the intended ip address and port (separated by a space).

Then search for this line:
[code]ECHO verbose off              >  %RESFI%

and add the following after it:

Code (]ECHO open %FTPSERVER% >> %RESFI%
[/code):


Scroll a few lines further, you will find the line that actually starts the FTP session:
[code]ftp -n -s:%RESFI% %FTPSERVER%

Change that line to
[code]ftp -n -s:%RESFI%
[/code]

That should work.

Gert

Title: Re: FTP TO IP ADDRESS
Post by Gert on Apr 3rd, 2005 at 7:53pm
The 3.2.6 version of watchDirectory has updated sample .bat files that have the above changes included.

http://www.watchdirectory.net/watchDirectoryVersions.html
Gert

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.