@echo off
set SWFURL=http://example.com/path/to/player.swf
set RTMP=rtmpe://example.com/path/to
set OUTPUT=output.flv

:DOWNLOAD
rtmpdump.exe -e -s "%SWFURL%" -r "%RTMP%" -o "%OUTPUT%"
echo errorlevel: %errorlevel%

IF %errorlevel%==9009 GOTO ERROR1
IF NOT %errorlevel%==0 GOTO DOWNLOAD
GOTO :END

:ERROR1
echo rtmpdump.exe not found.

:END
