Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- set PRGM=Foo
- set INPUT_FILE=input.txt
- set OUTPUT_FILE=output.txt
- set VALUES=(7 4 5)
- call :log "Generating..."
- call :generateInput
- call :log "Compiling..."
- javac %PRGM%.java
- call :log "Executing..."
- java %PRGM%
- call :log "Results..."
- type %OUTPUT_FILE%
- call :log "Done..."
- goto Exit
- :: ----------------------------------------------------------
- :: Functions
- :: ----------------------------------------------------------
- :printDate
- for /f "tokens=2-4 delims=/ " %%a in ('echo %DATE%') do (set mydate=%%c/%%a/%%b)
- for /f "tokens=1-3 delims=/:./ " %%a in ('echo %TIME%') do (set mytime=%%a:%%b:%%c)
- echo|set /p=[%mydate% %mytime%]
- goto:EOF
- :log
- call :printDate
- echo %~1
- goto:EOF
- :generateInput
- if exist %INPUT_FILE% del /F %INPUT_FILE%
- for %%x in %VALUES% do echo %%x>> %INPUT_FILE%
- goto:EOF
- :Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement