Use FTP in batch-files (upload/download something)
This is an example script that can connect to a a ftp server and download/upload files.
Just replace the following parts with yourown info:
theftpuser: replace with your ftp- user
thepasswd: replace with the password of your ftp- user replace with your ftp- server address

@echo off

set f="%temp%ftpc.txt"

::Compose ftp commands file
echo user theftpuser thepasswd>>%f%
echo binary>>%f%
::Change current local folder
::echo lcd Local_folder
::Change current ftp folder
::echo cd ftpfolder
::echo dir>>%f%
echo get>>%f%
echo bye>>%f%

::Execute ftp command
::Use "-d" key for verbose output
ftp -n -d -s:%f%

del /f /q %f%

This line shows what to do on the ftp server:
echo get>>%f%

It is currently made to copy the file to your harddrive (C:).
You could also upload a file to the ftp server. Replace this line with the following, to upload the file: C:\directory/file.rar:
echo put C:directory/file.rar file.rar>>%f%
admin / Dec 07, 2005
2004 - 2019 /