Embed FTP script into a batch script. Add this line at the beginning of the FTP script:
@ftp -i -s:"%~f0"&GOTO:EOF
The "FTP -s:ftpscript.txt" option executes a FTP script wheres "%~f0" resolved to the name of the running batch file.
"GOTO:EOF" ends the batch script and makes sure the FTP script doesn`t run as part of the batch.
Good: You end up with only one file that contains the batch script and the FTP script combined.
Minor flaw: The batch command in the first line causes an "Invalid command." error when executed in FTP context, however the FTP execution will continue.
- Single file to distribute combining batch and FTP script