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
ftp.server.com: replace with your ftp- server address

::---Start---
@echo off
setlocal

::Variables
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 thefile.zip C:thefile.zip>>%f%
echo bye>>%f%

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

::Cleanup
del /f /q %f%
endlocal
::---End---


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

It is currently made to copy the file thefile.zip 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
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2019 / lookass.ch
makememad@lookass.ch