| View previous topic :: View next topic |
| Author |
Message |
Uminnsky
Joined: 12 Aug 2009 Posts: 26
|
Posted: Wed Nov 25, 2009 12:15 pm Post subject: URLDownloadToFile still downloads non-existent file |
|
|
I have loaded a simple text file to my website, built a program to download that file. Everythinng works fine so far. I then delete the file off my webiste, re publish it with the changes, and yet the UrlDownloaToFile is still downloading the file (it isn't just creating a file with the same name, it has the content of the file). I tried going to the link in a web browser but the page is not found, as it is not supposed to be.
I realize this question is a mix between my website hosting, unrelated, and AHK. But I have exhausted my options on the website side and their tech support said the file is not there. Anyone have a clue as to how the UrlDTF still has this file stored somewhere? |
|
| Back to top |
|
 |
doyle
Joined: 14 Nov 2007 Posts: 325 Location: London, England
|
Posted: Wed Nov 25, 2009 12:27 pm Post subject: |
|
|
A future tip would be just to replace the existing file rather than delete it first.
How about creating a new folder for it, and re-directing the script to it?
Check that it exists by typing the URL into Explorer obviously. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Nov 25, 2009 12:45 pm Post subject: Re: URLDownloadToFile still downloads non-existent file |
|
|
You may use HttpQueryContentLength() to find the filesize of target.
Like:
| Code: | If HttpQueryContentLength( URL )
URLDownloadToFile, %URL%, %File%
|
| Uminnsky wrote: | | it isn't just creating a file with the same name, it has the content of the file). |
What version of AHK are you using? |
|
| Back to top |
|
 |
Uminnsky
Joined: 12 Aug 2009 Posts: 26
|
Posted: Wed Nov 25, 2009 6:33 pm Post subject: |
|
|
| SKAN wrote: | You may use HttpQueryContentLength() to find the filesize of target.
Like:
| Code: | If HttpQueryContentLength( URL )
URLDownloadToFile, %URL%, %File%
|
| Uminnsky wrote: | | it isn't just creating a file with the same name, it has the content of the file). |
What version of AHK are you using? |
Using the most recent as of the past couple months.
| Quote: |
How about creating a new folder for it, and re-directing the script to it?
Check that it exists by typing the URL into Explorer obviously. |
Yes, I could alter the script etc..., but my intention is for the script to remain unchanged on other user computers. When I want to disable the script from being able to install the file, I simply delete it off the website.
That is why it is puzzling, the file does not exist when I run the url in explorer, except the UrlDTF is still finding it and downloading it to the computer. |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 5336 Location: San Diego, California
|
Posted: Wed Nov 25, 2009 8:12 pm Post subject: |
|
|
Post you code and let us give it a try.
Please, make the code compilable and just a short script.
Leef_me |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
Posted: Wed Nov 25, 2009 8:40 pm Post subject: |
|
|
Maybe your local or network browser cache is playing tricks on you, I know from experience that people report they don't see changes in files, when they look the next day the "see" it. Report back tomorrow  _________________ AHK Wiki FAQ
TF : Text files & strings lib, TF Forum |
|
| Back to top |
|
 |
|