< Windows Programming < Programming CMD
A simple program that will ftp one file. Do not name the file ftp.bat or it will recurse.
set ftpUser=
set ftpPass=
set ftpSite=
set file=
@echo off
cls
: FTP the stuff
> script.ftp ECHO USER %ftpUser%
>> script.ftp ECHO %ftpPass%
>> script.ftp ECHO put %file%
>> script.ftp ECHO quit
FTP -v -n -s:script.ftp %ftpSite%
@type NUL >script.ftp
: Delete scripts
del script.ftp /Q
cls
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.