PcExpert Posted May 23, 2006 Share Posted May 23, 2006 Hello, I use InetGetSize to check for an update for my program. But when I try to check a filesize on my FTP Server it takes more then a minute to get the size. What's wrong? Thanks, PcExpert Link to comment Share on other sites More sharing options...
Valik Posted May 24, 2006 Share Posted May 24, 2006 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 More sharing options...
exodius Posted May 24, 2006 Share Posted May 24, 2006 What kind of cookie? Link to comment Share on other sites More sharing options...
Valik Posted May 24, 2006 Share Posted May 24, 2006 Chocolate chip and asbestos. Link to comment Share on other sites More sharing options...
PcExpert Posted May 24, 2006 Author Share Posted May 24, 2006 (edited) I have used the code like this:ftp://username:password@myipadress/files/update.exeBut just that takes more then a minuteHere's a part of the code:$size = InetGetSize("ftp://username:password@ipadress/files/update.exe")If $size = "212435" ThenTrayTip("Updater", "Er zijn momenteel geen updates voor dit bestand", "", "")Sleep(5000)ElseInetGet("ftp://username:password@ipadress/files/update.exe", "update.exe", 1, 1) Edited May 24, 2006 by PcExpert Link to comment Share on other sites More sharing options...
Valik Posted May 24, 2006 Share Posted May 24, 2006 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 More sharing options...
PcExpert Posted May 24, 2006 Author Share Posted May 24, 2006 Downloading goes fast. So there's no problem with downloading the files. Only the InetGetSize works slow. Link to comment Share on other sites More sharing options...
Valik Posted May 24, 2006 Share Posted May 24, 2006 Which version(s) of AutoIt have you tried? Try version 3.1.1.0 and the latest beta. Do both of them behave the same? Do both of them download the file fast? Link to comment Share on other sites More sharing options...
PcExpert Posted May 25, 2006 Author Share Posted May 25, 2006 OK, now I have installed the latest beta it woeks some faster, but it still takes 40 or 50 second to get the filesize. Link to comment Share on other sites More sharing options...
Valik Posted May 25, 2006 Share Posted May 25, 2006 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 More sharing options...
Rick Posted May 25, 2006 Share Posted May 25, 2006 (edited) 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 May 25, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
Valik Posted May 25, 2006 Share Posted May 25, 2006 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 More sharing options...
Rick Posted May 25, 2006 Share Posted May 25, 2006 (edited) 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 May 25, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
PcExpert Posted May 26, 2006 Author Share Posted May 26, 2006 OK, thanks all for your help and I shall try it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now