:: Batchfile to upload a screenshot to a website via FTP. 
:: Called from some 'Spectrum Lab Grabber' applications. 
:: FTP screenshots
:: Uses the command line driven FTP client in MS windows. 
:: Only works when located in c:\Spectrum\media\sd\capture\ftp_upxxx.bat . 
:: Doesn't require any 3rd-party software ! 
:: You will need to modify your provider's ftp host name, 
:: your user name, and (unfortunately non-encrypted) 
:: the FTP password in the 'ftpcmd' lines further below . 
:: The name of the file to be sent is specified as argument %1 
:: when this batchfile is invoked (from SL's periodic actions, etc) 
:: 
:: Make sure we are where we should be (current directory) : 
cd c:\Spectrum\   
:: 
:: Create the input (command file) for the ftp client program . 
:: The line after the USER command is the password .
> ftpcmd.txt ECHO USER robozor_data
>> ftpcmd.txt ECHO robozor_data
>> ftpcmd.txt ECHO cd robozor_data
>> ftpcmd.txt ECHO binary 
>> ftpcmd.txt ECHO put %1 
>> ftpcmd.txt ECHO disconnect 
>> ftpcmd.txt ECHO bye 
:: 
:: At this point, we have created a temporary command file 
:: for the FTP client. This comman file replaces the input 
:: which would be entered via keyboard in an INTERACTIVE ftp session . 
:: Now start the ftp client program, output redirected to a file 
:: which is EXTREMELY helpful for troubleshooting . 
:: Replace the dummy address with your provider's ftp address: 
FTP -n -s:ftpcmd.txt home.robozor.cz > ftplog.txt 
:: The -n option suppresses the auto-login upon initial connection . 
:: The -s option specifies a text file with FTP commands . 
:: If the FTP client (above) fails, TEST EACH STEP IN INTERACTIVE MODE ! 
:: (each step is now in ftpcmd.txt)
:End