home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
news
/
2391
/
form03
/
formed.bat
< prev
next >
Wrap
DOS Batch File
|
1993-12-07
|
806b
|
47 lines
@echo off
rem FORMED.BAT
:top
if "%1"=="" goto usage
if NOT "%edit%"=="" goto have_edit
if exist %1.frm call edit %1.frm
if exist %1.frm goto :formit
if exist %1 call edit %1
if exist %1 goto :formit
goto :new_file
:have_edit
if exist %1.frm call %edit% %1.frm
if exist %1.frm goto :formit
if exist %1 call %edit% %1
if exist %1 goto :formit
goto :new_file
:formit
form %1
echo "press [CTRL BREAK] to stop"
pause
goto :top
:new_file
echo // A FORM > %1.frm
if NOT exist %1.frm goto :has_FRM
echo end; >> %1.frm
rem we have created an empty file, try again
goto :top
:has_FRM
echo // A FORM > %1
echo end; >> %1
rem we have created an empty file, try again
goto :top
:usage
echo Usage: FORMED filename, goes through an editing cycle for a form
:end