Looping in FTP Command

Looping in FTP Command

Post by m.. » Wed, 29 Nov 2000 04:00:00



Hi,

I need to ftp a file from NT to UNIX contiuously say every 2 seconds.
(since the file is being updated periodicly)

Since the upload frequency is quite high, and I don't want to ftp login
to the UNIX sever everytime.  Is it possible to write a FTP command
with infinite looping to do this?

I know to use the "fpt -s text.fpt" but it need to re-connect to UNIX
everytime.

Is there any other way such as Window scripting, in order to do it?

Thanks!

Margaret

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Looping in FTP Command

Post by Phil Roby » Wed, 29 Nov 2000 04:00:00



> Hi,

> I need to ftp a file from NT to UNIX contiuously say every 2 seconds.
> (since the file is being updated periodicly)

> Since the upload frequency is quite high, and I don't want to ftp login
> to the UNIX sever everytime.  Is it possible to write a FTP command
> with infinite looping to do this?

> I know to use the "fpt -s text.fpt" but it need to re-connect to UNIX
> everytime.

> Is there any other way such as Window scripting, in order to do it?

> Thanks!

> Margaret

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Hi, Margaret:

Unfortunately, FTP does not have a WAIT or SLEEP command; nor does it
have anything like a LOOP command.  However:  depending on the speed of
the link between the two machines and the size of the file that is being sent, you
could do something like create a gigantic script file to send the file over and
over and over and over....  After each send of the file, the script also sends
a junk file that is big enough to require two seconds to send over your link.
This technique would allow you to open the Unix host only once at the beginning
of the script, but it is incredibly wasteful of resources!

open (Unix host)
user (userid) (password)
put the real file
put the junk file
put the real file
put the junk file
put the real file
put the junk file
:
:
:
:

 
 
 

Looping in FTP Command

Post by Stephe » Sat, 02 Dec 2000 04:00:00


Try putting some local commands in with exclamaition mark
If you can find a sleep.exe or wait.exe you could run that to delay for a
couple of seconds.



> > Hi,

> > I need to ftp a file from NT to UNIX contiuously say every 2 seconds.
> > (since the file is being updated periodicly)

> > Since the upload frequency is quite high, and I don't want to ftp login
> > to the UNIX sever everytime.  Is it possible to write a FTP command
> > with infinite looping to do this?

> > I know to use the "fpt -s text.fpt" but it need to re-connect to UNIX
> > everytime.

> > Is there any other way such as Window scripting, in order to do it?

> > Thanks!

> > Margaret

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

> Hi, Margaret:

> Unfortunately, FTP does not have a WAIT or SLEEP command; nor does it
> have anything like a LOOP command.  However:  depending on the speed of
> the link between the two machines and the size of the file that is being
sent, you
> could do something like create a gigantic script file to send the file
over and
> over and over and over....  After each send of the file, the script also
sends
> a junk file that is big enough to require two seconds to send over your
link.
> This technique would allow you to open the Unix host only once at the
beginning
> of the script, but it is incredibly wasteful of resources!

> open (Unix host)
> user (userid) (password)
> put the real file
> put the junk file
> put the real file
> put the junk file
> put the real file
> put the junk file
> :
> :
> :
> :

 
 
 

Looping in FTP Command

Post by Michael Luec » Mon, 04 Dec 2000 04:00:00


I would suggest using IBM ObjectRexx which support an FTP extension DLL.
Much nicer than trying to script FTP.EXE with a text file.

Check out www.software.ibm.com or come over to comp.lang.rexx - the water's
great!

Michael Lueck

 
 
 

1. FTP FTP FTP FTP FTP _HELLLLPPPP!!!

There seam to be hundreds of questions in this list about how to setup FTP
and no answers.

Please can some kind person give us all a step by step set of instructions
on how to setup a folder as a FTP server for a specific client. Basically I
am hosting websites and needs to give the client access to their folder and
nowhere else.

Thanks in advance

2. training in Europe

3. Ctrl+Ins, Shift+Ins, Shift+cursor

4. .INI File Maintence, Good PM text editor?

5. time loop fo delaying a command in CMD in CMD

6. Text in EXCEL Charts

7. reboot loop now turned into start up loop

8. How do I overload operators?

9. FTP commands on Windows 2000 not consistent

10. FTP mget command

11. automate FTP, AT command?

12. ftp using proxy via Command Prompt

13. FTP command