Request for FTP scrips

If you have information, script, utility, or idea that can be useful for HostMonitor community, you welcome to share information in this forum.
Post Reply
Ludo
Posts: 28
Joined: Wed Feb 12, 2003 6:00 pm
Contact:

Post by Ludo »

Hi, as I'm new to both HM and scripting, I'm in the position where I could use some help ... :sad:


What I want to do is test whether or not a file is on a remote system, using an FTP connection. I don't think HM can do that out-of-the-box, so I guess I need a bit of scripting - and I don't know how to ...

In "pseudo-code" it should probably look like :


do case
case Open_Ftp_Port() <> "OK"
exit("Error : No FTP port")
case Remote_Login() <> "OK"
exit("Error : Missing or Invalid account")
case Find_File() <> "OK"
exit("Error : File not found")
otherwise
Remote_Logoff()
exit("SUCCESS")
endcase


As I said, I'm new to it and would VERY MUCH appreciate a detailed reply. :smile: :smile: :smile:


Thanks,

Ludo

KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think you don't need any script. Just use URL test

Regards
Alex
Ludo
Posts: 28
Joined: Wed Feb 12, 2003 6:00 pm
Contact:

Post by Ludo »

Is there anything the you can NOT do with this program ??? :wink:

Thanks Alex, this works fine - it took me a while to realise that the filename should contain a full path. It does not seem to be enough to assume that the files is in the "default" directory.

:smile:




<font size=-1>[ This Message was edited by: Ludo on 2003-03-17 04:36 ]</font>
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, you are right. It needs full path to the file.

Regards
Alex
Mischke
Posts: 6
Joined: Mon Aug 09, 2004 1:56 am

Post by Mischke »

Is there a way to read the banner of the FTP Server? Like "220 XXX Microsoft FTP Service (Version 5.0)"
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You may use TCP test with "Alert when reply doesn't contain: 220 XXX Microsoft FTP Service (Version 5.0)" option

Regards
Alex
Post Reply