I previously wrote a similar rexx program such as this one… but this one is a little better than my previous one…. It still has crude error handling so it not meant for the layman to use but someone who knows what they doing. Essentially it does one function, download a number of files that contain some sequence numbering… 01 02 03 04…. etc….
Anyway here the code…. It will work on any system that has access to the *nix command wget. Under windows you will need cygwin. Under Linux you will need (obviously) REXX, you can get it from oorexx.org.
#!/usr/bin/rexx
/*
Gogetem
Syntax: Gogetem nnn url
Automatically starts from 1 using symbol replacement %%n as placeholder
*/
parse arg endvalue urlpath
if urlpath\=”” then
do
start = 1
sz = length(endvalue)
do count=start to endvalue
r = changestr(‘ ‘, format(count, sz), ‘0’)
s = changestr(‘%%n’, urlpath, r)
‘wget -t 0 -c -T 10 ‘s
end
end
else
do
say “Syntax incorrect.”
say
say “Syntax gogetem nnn urlpath”
say ” nnn = largest number in sequence”
say ” urlpath = url to filter. note that %%n is the placeholder in the path.”
end
exit
