Jump to content

wget incremental filenames


Recommended Posts

I am currently trying to create an XPlode xml that checks for newer file version before creating my uA iso.

The problems exist with filenames that increment with each new version e.g.

K-lite Mega Codec Pack uses the filename klmcodec137.exe and with each version the filename will change, what I need to do is find away to make the url generic

http://download.betanews.com/download/1080441198/klmcodec137.exe

to

http://download.betanews.com/download/1080441198/klmcodec???.exe

or something, I made various attempts but each time has produced and error

http://download.betanews.com/download/1080441198/klmcodec13[0-9].exe:
15:03:50 ERROR 404: Not Found.
http://download.betanews.com/download/1080441198/klmcodec13*.exe:
15:05:14 ERROR 404: Not Found.
http://download.betanews.com/download/1080441198/klmcodec13?.exe:
15:05:41 ERROR 404: Not Found.
http://download.betanews.com/download/1080441198/klmcodec*13[0-9]*.exe:
15:08:16 ERROR 404: Not Found.

Is what I want to accomplish feasable or am I using the wrong syntax altogether?.

Thanks.

Edited by benners
Link to comment
Share on other sites


I had the same problem with "Download.exe", but got a little more informative error message "Wildcards not supported with HTTP". I think this is the problem. I found ftp sites for some of the things I wanted to download, wildcards seem to work there. If you find solution please let me know.

E:\utils>download http://download.betanews.com/download/10804
41198/klmcodec???
File Downloader - Version 1.01 (build 7.4)
Downloads a file from a HTTP or a FTP server.
Copyright (c) 2004, Noel Danjou <webmaster@noeld.com>.

Server: download.betanews.com
Port: 80
Protocol: HTTP

Wildcards not supported with HTTP
E:\utils>

ftp://ftp.freenet.de/pub/filepilot/window...klmcodec137.exe

Edited by dman
Link to comment
Share on other sites

Well some how you need to get version info. After that you could use something like:

for /f "tokens=1" %%x in ('version +%%f%%s%%t') do set fst=%%x

wget http://download.betanews.com/download/1080441198/klmcodec%fst%.exe

Well I figured out how to download all of them. Just need a way to tell it to download only the latest and set as %fst% . Well I give up for now, just dont know how to get the latest one instead of all of them.

curl --list-only ftp://ftp.freenet.de/pub/filepilot/windows/multimedia/video/k-lite_codec_pack/ >> list.txt

wget --base=ftp://ftp.freenet.de/pub/filepilot/windows/multimedia/video/k-lite_codec_pack/  --input-file=list.txt

Edited by war59312
Link to comment
Share on other sites

Well I figured out how to download all of them. Just need a way to tell it to download only the latest
Same here I used
wget -a wget.log -nv -N -S "ftp://ftp.freenet.de/pub/filepilot/windows/multimedia/video/k-lite_codec_pack/klmcodec???.exe" -P "E:\XPDVD\Applications\codecs"

I thought with the time stamping it would only get files newer that the latest one but it downloads all the klmcodec exes and skips the klmcodec137.exe, looks like I'll have to find a place that only carries the latest version :D Thanks both for your help.

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

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