Hello I'd like to create a BATch-file to download a mp3 file with a increasing variable parameter URL that change daily. I've tried to use "bitsadmin" command but I've to replace different variables like "year", "month", "day", "series".
Any ideas how to do it?
bitsadmin /transfer grlavoro /download /priority normal http://www.radioarticolo1.com/userdata/media/audio/2015/03/20150331grl1800_54986.mp3 d:\grl.mp3
Is it possibile to do something like this?
@ECHO ON
set series=54986
set /a c=1
FOR /F "tokens=1 usebackq" %%i in (%series%) do (
set /a c=c+1
echo %%i, %c%
)
for /f "tokens=1-4 delims=/-. " %%i in ('date /t') do (call :set_date %%i %%j %%k %%l)
goto :end_set_date
:set_date
if "%1:~0,1%" gtr "9" shift
for /f "skip=1 tokens=2-4 delims=(-)" %%m in ('echo,^|date') do (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