|
||||||||||||||||
|
Mathematica Sample Batch File
|
|
|
mathematica.xml
mathematica.bat
REM --- Call setup file for Mathematica
call setup_mathematica.bat REM --- Users must set ROOTDIR, OUTDIR, IN_FILE and OUT_FILE variables.
set ROOTDIR=\\tc.cornell.edu\tc\users\%USERNAME%\mathematica set OUTDIR=%ROOTDIR%\output
mkdir %OUTDIR%
set IN_FILE=test.m set OUT_FILE=test.out REM --- Create temp directory, clean up any pre-existing out_file(s),
REM --- and copy input file(s) from ROOTDIR. del /Q T:\%USERNAME% mkdir T:\%USERNAME% cd /D T:\%USERNAME% del /S /Q T:\%USERNAME%\*.* copy %ROOTDIR%\%IN_FILE% T:\%USERNAME%\ REM --- Execute Mathematica and run your script file
math.exe < %IN_FILE% > %OUT_FILE% REM --- Copy the T: files back to the output directory
copy /y T:\%USERNAME%\%OUT_FILE% %OUTDIR%\ REM --- Clean up files from this job
cd /D T:\ rd /s /q T:\%USERNAME% vsched -c |
|
![]() |
||