I don't know if this will work or not, but one thing to look at is .netrc support.
I know on windows, some people here put their HTTP login credentials in a netrc file so they don't have to specify it on the git command. Perhaps FTP can work similarly?
I'm on OSX, and that file sits in my home directory. I don't know where it goes on windows.