FTP Scripts Sharing Login Info

Manage the FTP login separately from your FTP scripts.


If you have multiple FTP scripts that all use the same login information to your FTP site then you may wish to manage the login information separately from your FTP scripts in a single place. That way if the username, password or hostname for the FTP connection changes you only need to edit a single place instead of having to edit all FTP scripts one by one.

This automatic login script (also described in detail earlier) can be used to execute different FTP scripts that share the same login information stored within the batch file.

Example: FtpLogin.bat script1.ftp

Note: The FTP scripts passed into the batch must have the login sequence removed.

Note: The FTP script executes even if the connection sequence fails potentially causing `Not connected` and other errors. This is no different from regularly executing FTP with -s option.

Script: Download: FtpLoginSharing.bat  
@type %1|ftp -i -s:"%~f0"&GOTO:EOF
open example.com