yet another %MYFILES%

Convert your BATch files into EXEcutable format in one click.
Post Reply
frenchrl
Posts: 4
Joined: Wed Mar 22, 2006 1:08 pm

yet another %MYFILES%

Post by frenchrl » Mon Apr 13, 2009 5:45 pm

I have a choice menu setup that simply calls other batch files (Script is below) The way I interpreted the %MYFILES% usage was to replace
CALL C:\Work_folder\Compile\ with
%MYFILES%

I know that wrong, so can someone please tell me the correct way?
Thanks,



=======Begin=======
@ECHO OFF

:BEGIN


CLS
ECHO.
ECHO Auto Compile menu
ECHO.
ECHO.
ECHO 1=Compile ALL
ECHO 2=Compile TEST
ECHO 3=Compile TOP3
ECHO 4=Compile FT1 only
ECHO 5=compile IND only
ECHO 6=compile DEV only
ECHO 7=Edit compile_it sql
ECHO 8=EXIT
ECHO
ECHO.
c:\ntreskit\CHOICE /C:12345678

pause

rem PICK A NUMBER (0, 1, 2, 3, 4, 5,6,7 or 8)%1
ECHO.

IF ERRORLEVEL ==8 GOTO EIGHT
IF ERRORLEVEL ==7 GOTO SEVEN
IF ERRORLEVEL ==6 GOTO SIX
IF ERRORLEVEL ==5 GOTO FIVE
IF ERRORLEVEL ==4 GOTO FOUR
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
IF ERRORLEVEL ==0 GOTO ZERO
GOTO :END


:EIGHT


exit



:ZERO

notepad compile_it.sql

GOTO :BEGIN





:SEVEN

@IF NOT EXIST C:\Work_folder\Compile\compile_it.sql (GOTO OLD) ELSE (GOTO NEW)


:OLD

@IF NOT EXIST C:\Work_folder\Compile\compile_it.old (GOTO MISSING) ELSE (GOTO OLD2)

:MISSING
ECHO FILE DOES NOT EXIST
pause
GOTO END

:OLD2
notepad compile_it.old

GOTO BEGIN

:NEW
C:\Work_folder\Compile\notepad compile_it.sql

GOTO BEGIN

:SIX
CALL C:\Work_folder\Compile\compile_dev.bat

GOTO END

:FIVE
CALL C:\Work_folder\Compile\compile_ind.bat

GOTO END

:Four
CALL C:\Work_folder\Compile\compile_T1.bat

GOTO END

:THREE
CALL C:\Work_folder\Compile\compile_top3.bat

GOTO END

:TWO
CALL C:\Work_folder\Compile\compile_test.bat


GOTO END

:ONE
CALL C:\Work_folder\Compile\compile_all.bat

GOTO END



:END

del compile_it.old
rename compile_it.sql compile_it.old
REM ECHO Completed. Bringing up DOS menu again...
REM pause
REM f:go.bat
goto :BEGIN
:QUIT
f:

======End=======

support
Site Admin
Posts: 396
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Tue Apr 14, 2009 11:30 am

Yes, you right. You need to replace:

CALL C:\Work_folder\Compile\ with
CALL %MYFILES% \

and include required files into EXE.

Post Reply