Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // REM name of this file: nppGradingScript.bat. It's named a bat batch file to enable syntax coloring, but it's actually a text file
- NPP_SAVE //saves current file
- CD $(CURRENT_DIRECTORY) //make sure this is executed in the directory of (viewing) the source code!!!!!!
- echo $(CURRENT_DIRECTORY)
- SET MAINDIR = C:\Users\BruceSmith\Google Drive\courses\m140\assignments\18fa\P4-Binsort
- // REM ************************* adjust these for current assignment ******************************
- // REM AFTER COMPILING (via ctrl-shft-j) :
- // REM $(INPUT1) is the name of the file containing genomic data we are searching through
- // REM
- // REM "C:\Program Files\Java\jdk1.8.0_11\bin\java.exe" $(NAME_PART) $(INPUT1) 3 //3 is number of trials
- // REM where the input files are in a directory noted below
- SET GRADED_RESULT = $(CURRENT_DIRECTORY)\p4grade.txt
- SET STU_NAME = $(CURRENT_DIRECTORY)\stuName.txt
- SET OUTFILE = "$(CURRENT_DIRECTORY)\out.txt"
- SET TIMESTAMP = "$(CURRENT_DIRECTORY)\ts.txt"
- SET RUBRICMASTER = $(MAINDIR)\P4rubric.txt
- SET INPUT1 = $(MAINDIR)\data sets\input02.txt
- SET INPUT2 = $(MAINDIR)\data sets\input03.txt
- SET OUTPUT = $(CURRENT_DIRECTORY)\out.csv
- //cmd /c del "$(STU_NAME)"
- // REM ******************************************************************
- // REM Use DOS powershell to read name and email in first 3 lines
- cmd /c powershell -command "& {get-content "$(FILE_NAME)" | select-object -first 3}" > "$(STU_NAME)" < nul
- // REM Append rubric master to 3 lines with student name:
- cmd /c type "$(RUBRICMASTER)" >> "$(STU_NAME)"
- //REM generate a more sensible file name
- cmd /c copy "$(STU_NAME)" "$(GRADED_RESULT)"
- //REM Run at least two data sets and write to a file, concatenate runs to first
- cmd /c echo ------- 1 --------- >> "$(GRADED_RESULT)"
- cmd /c java $(NAME_PART) "$(INPUT1)" "$(OUTPUT)" >> "$(GRADED_RESULT)"
- cmd /c pause
- cmd /c echo ------- 2 --------- >> "$(GRADED_RESULT)"
- cmd /c java $(NAME_PART) "$(INPUT2)" "$(OUTPUT)" >> "$(GRADED_RESULT)"
- //REM append output to rubric to give student results
- //REM cmd /c type $(STU_NAME) >> $(GRADED_RESULT)
- NPP_OPEN $(GRADED_RESULT)
- cmd /c explorer $(CURRENT_DIRECTORY)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement