Jump to content

Recommended Posts

Hello I don't know where the problem is, but it seems InetGet sometimes just fails to overwrite existing file with a new one from the server. I use it to download an exe file (with flag 1 to force reload from remote site) and I suppose it should overwrite the current file on a disk! To my surprise it does not work on some pcs and it seems I will have to add filedelete before inetget to ensure it really works and downloads the fresh file from a server. There should be no permissions problem because the file is created by the same user under which the script (service) runs and InetGet does not return 0 so it means it probably thinks that it downloads it. If I rename the existing file and rerun the function it downloads it correctly, but from some reason it was not able to overwrite the previous file. When I renamed the old file back and rerun the function it mysteriously was able to overwrite the file!

What can cause this? IE version? There is IE8 on this pc. I have more computers with this problem so I may investigate more on it later yet.

Link to post
Share on other sites

Well it does not specifically mention in the help file that it is supposed to overwrite a file.

What is it that makes you think it should?

And I don't really think an extra line of code to delete the file first is a massive task anyway.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to post
Share on other sites

you can't be serious with this ;) Nobody says it is a problem to add filedelete. All I think is that it would be much better if it behaved predictably. Helpfile does not say so, but inetget usually overwrites the file and returns the number of bytes downloaded but sometimes it just does not overwrite the file without any obvious reason but still returns the number of downloaded bytes! This is not good. Of course I would always add filedelete before it if it was clear that the file does not get overwritten. Perhaps there should be a note in the helpfile that developers should not rely on the file being overwritten...

Edited by LoWang
Link to post
Share on other sites


A couple questions:

- How did you identify that the file was not deleted?

- Is it possible that the same data was downloaded consecutively? (making it appear that the file was not deleted)

- Can you tell if there is any other access to the file when the download occurs?

- How frequently does this happen?

- Does this happen across multiple data sources/targets?



Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...