mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2005
Posts: 72
B
Babel fish
OP Offline
Babel fish
B
Joined: Apr 2005
Posts: 72
hello
is it possible to upload a file with a trigger???
e.g.: on *:text:!stats:#: { upload......stats.txt }
if yes... how?

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

Joined: Apr 2005
Posts: 72
B
Babel fish
OP Offline
Babel fish
B
Joined: Apr 2005
Posts: 72
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 :-(

Last edited by bodo0815; 30/11/05 09:26 PM.
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
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

Joined: Apr 2005
Posts: 72
B
Babel fish
OP Offline
Babel fish
B
Joined: Apr 2005
Posts: 72
it works fine thx :-)
...but how can i upload files to a specific path?
e.g.: root/html/test

Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
In the remote path put "/root/html/test/your-file"


Link Copied to Clipboard