;link username password filename link2 if 0<4 { msgbox,wrong number of arguments return } if 0>5 { msgbox,wrong number of arguments return } StringRight,stamp,4,5 If Stamp=stamp { StringTrimRight,stamp,4,5 splitpath,stamp,, OutDir, OutExtension, OutNameNoExt, newfile=%OutDir%\%OutNameNoExt%%A_Now%.%OutExtension% FileCopy,%stamp%,%newfile%, 4:=newfile flag:=True } filedelete,ftp.temp FileAppend,open %1%`n,ftp.temp FileAppend,%2%`n,ftp.temp FileAppend,%3%`n,ftp.temp FileAppend,Binary`n,ftp.temp FileAppend,put "%4%"" `n,ftp.temp FileAppend,bye`n,ftp.temp if 0=5 { splitpath,4,filename clipboard=%5%/%filename% } runwait,ftp -s:ftp.temp filedelete,ftp.temp if flag filedelete,%4% return