@echo off
if not exist %1.emxdoc goto syntax
emxdoc -I -i cp850 -f -o %1.ipf %1.emxdoc
rem emxdoc -i  -f -e@ -o %1.ipf %1.emxdoc
if not exist %1.ipf goto exit
ipfc %1.ipf /inf
del %1.ipf 2>nul
if exist %1.inf view %1.inf
goto exit

:syntax
echo .emxdoc to .INF translator. 
echo Syntax: emxdoc2inf _file_name_   (not _file_name_.emxdoc !)

:exit