BBEdit FTP Save

I’m trying to write a script that will a BBEdit document to an FTP site. I’m fine with saving locally to my hard drive, but I can’t figure out the syntax for saving to a remote site.

I can use the following script to gather up what I imagine is the requisite information:

tell application “BBEdit”
set ftpInfo to FTP Info of document of window 1
set ftpPath to URL of ftpInfo
end tell

But I have no idea how to assemble this info into a functioning ftp save.

Can anyone help?

Thanks very much.