mIRC Home    About    Download    Register    News    Help

Print Thread
simple ftp function #160384 26/09/06 06:59 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline OP
Vogon poet
OP Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Hey i need a script that can login to a ftp server (uname and pw) and download a file, then delete it from that ftp server. Ive seen a few complicated ftp commands for mirc that dont seem to work. Im not very experienced with sockets. If anyone has something to do this, please let me know. Thanks

HAMM3R


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: simple ftp function #160385 26/09/06 09:01 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While this probably can be done, we would need more information to be able to write it. Minimum that I can think of, would be the ftp site address.
Since the ftp site requires a login, then it would be almost impossible to correctly test any code written, unless the person that wrote it had an account for that site. (while not impossible, I wouldn't want to bet on it).
Also, for the file transfer, you're not going to manage to get FTP speeds using mIRC.

Personally, I think you'd be just as well, if not better, off getting an FTP program and using it. Some FTP programs will allow you to delete files from the remote location, presuming you have sufficient access to the remote location.

For FTP, I use FlashFXP

Re: simple ftp function #160386 26/09/06 09:23 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline OP
Vogon poet
OP Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Yeah but all I need is to download a 1kb or 2kb text file, save it to a var or hash table, then delete it. It also needs to be able to download about once a second. Basically im exporting chat from a game server to echo.txt. I can access this from the ftp server. I want to connect, download echo.txt, msg it to a channel, then delete echo.txt and do it all again 1 second later. This way when i download a new echo.txt its only new text. So a ftp program just wouldnt work well here. Any ideas?


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: simple ftp function #160387 26/09/06 09:29 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Ideas, yes, but as I stated, I don't think anything could realistically be written without the ftp address as a minimum of information.

Re: simple ftp function #160388 26/09/06 09:59 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:

Basically im exporting chat from a game server to echo.txt. I can access this from the ftp server. I want to connect, download echo.txt, msg it to a channel, then delete echo.txt and do it all again 1 second later.


and you want to do it this way because you are not using mIRC on the gamer server network?

otherwise there are pleanty of multiserver echobots, even on these boards

Re: simple ftp function #160389 27/09/06 08:23 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Windows 's ftp.exe can be scripted.
http://tinyapps.org/docs/ftp.html
Code:
//run -h ftp.exe -s:myscript
//run a timer checking if the file has downloaded.


$maybe