Skeleton script to upload files to a FTP server with ftp.exe; automated by mIRC
From AutoHotkey's FTP documentation http://www.autohotkey.com/docs/commands/FileAppend.htm (at the bottom)
There's some self explanatory things you'll need to replace in the script… they all start with "FTP" or "PC" & are all capitalized
FTP TEXT
FTP IMAGE
Documentation
http://technet.microsoft.com/en-us/library/bb490910.aspx
http://technet.microsoft.com/en-us/library/bb490911.aspx - FTP Subcommands
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftp.mspx?mfr=true
alias ftptext {
var %R = $rand(0,999999), %C = 1
while (%C <= $cb(0)) && ($len(%Clipboard) <= 3550) {
set %Clipboard %Clipboard $+ $cb(%C) $+ $crlf
inc %C
}
write -c %R $+ .html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> $+ $crlf $+ <html> $+ $crlf $+ <head> $+ $crlf $+ <title>FTP with mIRC & FTP.exe</title> $+ $crlf $+ <meta charset="utf-8" /> $+ $crlf $+ </head> $+ $crlf $+ <body> $+ $crlf $+ <textarea rows="30" cols="100"> $+ %Clipboard $+ </textarea> $+ $crlf $+ </body> $+ $crlf $+ </html>
write -c FTP.txt open FTP_DOMAIN_OR_IP $+ $crlf $+ FTP_LOGIN_USERNAME $+ $crlf $+ FTP_LOGIN_PASSWORD $+ $crlf $+ cd FTP_DIRECTORY_TO_UPLOAD_TO $+ $crlf $+ send " $+ $mircdir $+ %R $+ .html" $+ $crlf $+ quit
run -n ftp.exe -v -s:" $+ $mircdir $+ FTP.txt"
.timer 1 30 remove FTP.txt $chr(124) remove %R $+ .html
}
alias ftpimage {
var %R = $rand(0,999999)
write -c FTP.txt open FTP_DOMAIN_OR_IP $+ $crlf $+ FTP_LOGIN_USERNAME $+ $crlf $+ FTP_LOGIN_PASSWORD $+ $crlf $+ cd FTP_DIRECTORY_TO_UPLOAD_TO $+ $crlf $+ binary $+ $crlf $+ send " $+ $findfile(PC_DIRECTORY_TO_SEARCH,*.png;*.gif;*.jpg;*.jpeg;*.bmp;*.ico,1,1) $+ " %R $+ .png $+ $crlf $+ quit
run -n ftp.exe -v -s:" $+ $mircdir $+ FTP.txt"
.timer 1 30 remove FTP.txt $chr(124) remove $findfile(PC_DIRECTORY_TO_SEARCH,*.png;*.gif;*.jpg;*.jpeg;*.bmp;*.ico,1,1)
}