commands for batch files
You can run FTP commands in a batch file with the
Create a .txt file with the FTP commands, one command
# display progress
# copy in binary mode (or asc for Ascii)
lcd <local folder> # change
cd <remote folder> # change
directory on FTP server
get <remote file> #
copy file to local directory
Example file download_logfiles.txt:
Now you can start the download from the command line
with the following command:
If you would like to check your FTP Server at regular
intervals, you can use the command line utility SLCheck.
SLCheck connects to the FTP Server and checks the answer. Batch
files can be executed in dependance of the result, e.g. to send
alarm notifications. Try the following command:
-p 21 -a ftp.domain.com -r "220 ProFTPD"
can be the normal answer from a FTP Server.
All results are logged in a logfile. You can monitor your FTP Server by running SLCheck as a scheduled task, e.g. once a minute.