Windows Programming/Programming CMD/Sample FTP

      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
      
      Last modified on 1 December 2008, at 20:11