batch file - MS-DOS Command Variable URL download -


hello i'd create batch-file download mp3 file increasing variable parameter url change daily. i've tried use "bitsadmin" command i've replace different variables "year", "month", "day", "series".

any ideas how it?

bitsadmin /transfer grlavoro /download /priority normal http://www.radioarticolo1.com/userdata/media/audio/2015/03/20150331grl1800_54986.mp3 d:\grl.mp3 

is possibile this?

@echo on set series=54986  set /a c=1  /f "tokens=1 usebackq" %%i in (%series%) ( set /a c=c+1 echo %%i,  %c% )  /f "tokens=1-4 delims=/-. " %%i in ('date /t') (call :set_date %%i %%j %%k %%l) goto :end_set_date  :set_date if "%1:~0,1%" gtr "9" shift /f "skip=1 tokens=2-4 delims=(-)" %%m in ('echo,^|date') (set %%m=%1&set %%n=%2&set %%o=%3) goto :eof  bitsadmin /transfer grlavoro /download /priority normal http://www.radioarticolo1.com/userdata/media/audio/%yy%/%mm%/%yy%%mm%dd%grl1800_%series%.mp3 d:\grl.mp3 

it's easier , less locale-dependent set date variables wmic os localdatetime.

for /f %%i in ('wmic os localdatetime /format:list ^| find "="') set "%%i" set "yyyymmdd=%localdatetime:~0,8%" set "yyyy=%yyyymmdd:~0,4%" set "mm=%yyyymmdd:~4,2%" 

also, it's preferable use powershell bitstransfer module rather bitsadmin, since latter deprecated , removed in future versions of windows. side benefit, nice curses-style progress bar powershell command.

set "url=http://www.radioarticolo1.com/userdata/media/audio/%yy%/%mm%/%yymmdd%grl1800_%series%.mp3" powershell "import-module bitstransfer; start-bitstransfer %url% d:\grl.mp3" 

i'm afraid don't understand you're trying %series% variable. under circumstances, , how many times, intend increment it?

i had @ website you're leeching. although don't understand italian, did come across podcast archive page. podcasts offered download served coldfusion script accepting incrementing numeral in query string. there's no date manipulation needed if use audio_download.cfm script. preferable use that, don't have try pair date series number? (you're italian language expert in thread. i'm genuinely asking.)


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -