Latest file is not downloaded using batch file.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
blackgolf
Posts: 7
Joined: 20 Apr 2012 07:20

Latest file is not downloaded using batch file.

#1 Post by blackgolf » 20 Apr 2012 07:51

Hi
I have the following batch files to download a file from a web server BUT the latest file is not downloaded.
I downloaded file XYZ.zip to my PC. The next day a new file is there with the same name but with new content.
When downloaded to my PC it is still the old file not the latest - as if it did not download but used a cache version on my PC.
Any help will be appreciated.

I tried 2 batch files but both do not work.
My one batch file:
c:\url2file\URL2File http://xyz.com/xyz.zip c:\temp\xyz.zip

My second batch file:
cd\temp
c:\wget\wget http://www.xyz.com/xyz.zip


Thanks

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Latest file is not downloaded using batch file.

#2 Post by abc0502 » 20 Apr 2012 08:34

Using wget command should be like that in a batch file:

Code: Select all

@echo off
cls
set "wget=c:\wget\wget.exe"
set "url=http://www.xyz.com/xyz.zip"
set "dir=D:\downloads"

"%wget%" -c "%url%" -P "%dir%\xyz.zip"

change the wget location and the url and distination in dir then run the batch.
try it and let us know

note
if it didn't work remove the qouts from "%wget%" and if it didn't work again remove the quotes from "%url%"

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Latest file is not downloaded using batch file.

#3 Post by abc0502 » 20 Apr 2012 08:48


blackgolf
Posts: 7
Joined: 20 Apr 2012 07:20

Re: Latest file is not downloaded using batch file.

#4 Post by blackgolf » 20 Apr 2012 09:02

Thanks for the reply. I have amended as you told me to, but the latest file is still not downloaded.
I know there is a later file but only the old file is downloaded. It is as if the cache file on my PC is placed in the downloads folder (not sure if there is as I deleted all occurances of the file).
The filename on the server is always the same ZIP file, except they placed a new one there daily. The date of the file is 17 April but 20 April is there already.

It seems it got nothing to do with the bat file, it must be a PC setting or maybe a setting in my DSL router that sees it as a duplicate !!!

I am frustrated as I am trying for a long time to fix this already.
I also checked now, putting the download URL straight in IE9 or Firefox, I still get the old file.

Thanks anyway...........

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Latest file is not downloaded using batch file.

#5 Post by foxidrive » 20 Apr 2012 09:52

blackgolf wrote:I also checked now, putting the download URL straight in IE9 or Firefox, I still get the old file.

Thanks anyway...........


The cache is in your ISP and an override has to be used to force the cache to reload the file.

Ask your ISP helpdesk to see if they know of any tools that can do this.

In the past I used Net Vampire as a downloading tool and in that is a setting to force the upstream proxy to reload the file from the source.

blackgolf
Posts: 7
Joined: 20 Apr 2012 07:20

Re: Latest file is not downloaded using batch file.

#6 Post by blackgolf » 20 Apr 2012 10:43

Thanks for that Foxidrive, it is going to take a lot of pain to get my ISP to understand what I mean, they are not the brightest of people working there - sorry to say but it is a fact.

Regards
Chris

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Latest file is not downloaded using batch file.

#7 Post by abc0502 » 21 Apr 2012 03:17

i'm not aware of the this ISP problem but i think u can use ssh tunnel, that will encrypt ur connection and the ISP won't know what files u are downloading and u can download the file every time u use ur batch

blackgolf
Posts: 7
Joined: 20 Apr 2012 07:20

Re: Latest file is not downloaded using batch file.

#8 Post by blackgolf » 21 Apr 2012 11:07

Thanks guys for the help.
I added a Proxy server to my download manager and the latest file comes in 100% what I want.

abc0502 - Thanks for telling me about tunneling but I am not clued up how to use it. I did read about it but it means downloading the client and set it up. Not at all cumfortable to do it.

Many thanks again
Chris

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Latest file is not downloaded using batch file.

#9 Post by foxidrive » 21 Apr 2012 15:48

That's a good result there Chris.

Thanks for telling us the outcome.

Post Reply