@echo off
if not exist %1.td0 goto usage
if exist %1.ima goto already

tdunp %1
tdcvt -f %1.zd0
if not exist %1.fdi goto error
del %1.zd0
fdi2ima %1.fdi
if not exist %1.ima goto error
del %1.fdi
echo Ok.
goto end

:already
echo File exist.
:error
echo Aborted.
goto end

:usage
echo ÿ
echo Usage: TD2IMA.BAT FILENAME
echo                name without Extension !!!!!!!

:end
