Forum Moderators: phranque
OPEN my.ftp.com
mylogin
mypassword
binary
MPUT mylog.rar
BYE
Make a bat file that executes it...
FTP -i -s:C:\script_daily.ftp
Then execute the bat file.
It always helps to zip or rar those huge files before the transfer. That can/should be automated too.
The only thing mising from the bat file above is the IP or URL of the FTP server.
put all the commands in the "script.txt" file and the FTP.BAT file need only have one line:
FTP -i -s:C:\script.txt
Of course you have to make sure you are running the FTP.BAT from somewhere where it can execute the ftp.exe program. Mine looks like this:
c:
FTP -s:e:\script.txt 64.40.****.xxx
My ftp.bat is on the E drive so I need to first change the directory to C.
Then, my script is on the E drive as well.
That's all there is to it.
I run it automatically using the Windows job scheduler and I get my files every day.
I have used those sort of scripts for quite a long time for repetitive tasks.
.
In the script.001.txt file:
open ftp.site.net
username
pssword
cd /webspace
dir
send c:\mydocu~1\www\site.001\folder\latest.index.htm index.html
dir
close
.
In a shortcut icon:
Target: C:\WINDOWS\FTP.EXE -d -s:c:\mydocu~1\www\site.001\scripts\script.001.txt