mIRC Homepage
Posted By: bodo0815 upload file to ftp with trigger - 30/11/05 06:54 PM
hello
is it possible to upload a file with a trigger???
e.g.: on *:text:!stats:#: { upload......stats.txt }
if yes... how?
Posted By: SladeKraven Re: upload file to ftp with trigger - 30/11/05 07:44 PM
I'm not too sure if this works because I don't have an FTP account so..
This is using Mavric-'s (Using FTP through mIRC without sockets.) tutorial. smile

Code:
On *:Text:!upload &:*: {
  if ($isfile($2)) {
    if (!$isfile(batch.bat)) {
      var %bat = write batch.bat
      %bat @echo off
      %bat -i -s:ftp.txt
      %bat exit
    }
    var %ftp = write ftp.txt
    %ftp ftp
    %ftp open your.ftp.server
    %ftp YourUsername
    %ftp YourPassword
    %ftp PUT $2
    %ftp QUIT
    run batch.bat
  }
}


-Andy
Posted By: bodo0815 Re: upload file to ftp with trigger - 30/11/05 09:26 PM
hmm
now i have this:
ftp.bat:
@echo off
ftp -i -s:ftp.txt
exit

ftp.txt:
ftp
open myftp.com
myusername
mypass
test/test
put D:\Local_WEB\stats.html
quit

alias:
Code:
alias transfer {
  var %textfile = C:\test\ftp.txt
  run C:\test\ftp.bat
}


on /transfer a windows open and close
but the file "stats.html" is not on FTP :-(
Posted By: schaefer31 Re: upload file to ftp with trigger - 30/11/05 11:03 PM
Hmm... I was interested in this as well and tried the above mentioned tutorial. However I ran into some problems with it. The file doesn't exactly upload. It creates the file on the ftp but it's completely blank file (0kb). So I searched mircscripts and found this, which works great:

http://www.mircscripts.org/comments.php?cid=2520
Posted By: bodo0815 Re: upload file to ftp with trigger - 01/12/05 12:02 AM
it works fine thx :-)
...but how can i upload files to a specific path?
e.g.: root/html/test
Posted By: schaefer31 Re: upload file to ftp with trigger - 01/12/05 12:29 AM
In the remote path put "/root/html/test/your-file"
© mIRC Discussion Forums