Jump to content

InetGetSize works slow


Recommended Posts

Would you call a doctor and say "I'm sick, send me medicine" and then hang up?

I'll give you a cookie if you can provide any less useful information than what you've provided so far.

Link to comment
Share on other sites

I have used the code like this:

But just that takes more then a minute

Here's a part of the code:

$size = InetGetSize("ftp://username:password@ipadress/files/update.exe")

If $size = "212435" Then

TrayTip("Updater", "Er zijn momenteel geen updates voor dit bestand", "", "")

Sleep(5000)

Else

InetGet("ftp://username:password@ipadress/files/update.exe", "update.exe", 1, 1)

Edited by PcExpert
Link to comment
Share on other sites

The code appears syntactically correct.

Does downloading it take a long time, too? Have you tried creating a 0-byte file on the server and getting the size of it? What about trying to download a 0-byte file? Does that take a minute, too?

Link to comment
Share on other sites

Can you find a publicly available server that demonstrates the same problem? Otherwise, it sounds to like you have some sort of issue with your FTP server. Are you connecting to the server via an IP or hostname? Try both, are both slow?

Really, I can't think of anything in AutoIt that could be slowing things down and nobody has ever reported a problem like this that I can remembered so I think the problem is on your end somewhere.

Link to comment
Share on other sites

actually i have the same problem with my works ftp site, the way i got around it was to create a separate .txt file with the filesize of the file i wanted, download the txt file and read it, it does seem on some ftp servers that inetgetsize await ftp timout before returning hope this helps Rick

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

That sounds like a problem with the FTP server trying and failing to do a DNS lookup on the incoming client. I had a similar problem with my router and SSH connections. You can fix the problem by adding your computer's IP address and name to the hosts file on the remote machine. There's probably an underlying configuration issue that needs fixed that would render the hosts file fix redundant.

Without an FTP server on which to test, there's really nothing we can do.

Link to comment
Share on other sites

adding an ip address on the ftp server is out of the question as that'll be unknown, as our customers access the site and we have no knowledge of their i.p address's

not sure if its any help but we use fileZilla server v0.9.17

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...