@echo off

rem  With the above '@echo off' line this bat file will close automatically unless there
rem  is an error of some kind.  If so, click on the GoNec window to see what happened.
rem
rem  This version of NEC expects to have input and output files named in a file which
rem  is itself named 'NecFiles.dat', containing names '$Multi$.nec' and '$Temp$.out'.
rem  The output file is renamed on termination to signal the caller that NEC is done.
rem  (Assumes caller has deleted '$Multi$.out' and is waiting for it to re-appear.)  The
rem  '$Multi$.out' file is also deleted here so this bat file can be run stand-alone.
rem
rem  NOTE:  On computers with limited memory you may wish to replace the use of
rem  'Nec2dxs1k5.exe' (1500 segments) with 'Nec2dxs500.exe' (500 segments) below.  
rem  You may also wish to use 'Nec2dxs3k0.exe' (3000 segments) or 'Nec2dxs5k0.exe'
rem  (5000 segments) for very large models.  Replacement Nec2dxs___.exe modules are
rem  available in the Nec2dxs.zip file from the Unofficial NEC Archives site at
rem  www.qsl.net/wb6tpu/swindex.html.

Nec2dxs1k5.exe  <NecFiles.dat   >$Nec$.log
if exist $Multi$.out del $Multi$.out
rename $Temp$.out $Multi$.out