The command line ftp utility that comes with WIN95 and above is
scriptable.
You invoke it from the command line like this: "ftp -s:myscript.txt"
The script file is just a list of what you would normally have typed
manually. Here's an example of how someone might synchronize
Netscape bookmarks between work and home.
open myofficemachine.somedomain.com
myusername
mypassword
cd c:\progra~1\netscape\users\me
lcd "c:\progra~1\netscape\users\me
get bookmark.htm
bye
If you want to make the process even easier, you can create a batch file
something like the following and call it something like
"getbookmarks.bat". This batch passes itself to the ftp program as an
argument (the first line is the clever part, notice the %0), so that
everything is self contained. The batch interpreter skips the ftp script,
and the ftp program generates a couple of harmless error messages,
but otherwise safely ignores the lines that aren't part of the ftp script.
The batch looks something like this:
ftp -s:%0.bat
goto done
open myofficemachine.somedomain.com
myusername
mypassword
cd c:\progra~1\netscape\users\me
lcd "c:\progra~1\netscape\users\me
get bookmark.htm
bye
:done
I found this ftp-script-in-a-batch trick on a web site about dos batch files,
but I can't remember how to find it again to give proper credit.
On 11 Nov 99, at 16:41, John Waters wrote:
{Quote hidden}> Hi all,
>
> I need to upload some files to a ftp site regularly. But the operation has
> to be automatic and under the control of a special application program
> developed by me. Does anyone know if there is any ftp utilities available
> that can be called from another program (preferably DOS base)?
>
> Thanks in advance.
> John
>
>
>
> ______________________________________________________
> Get Your Private, Free Email at
http://www.hotmail.com
>
---
Peace,
William Kitchen
The future is ours to create.