Here are two examples of easy scripts to do. One of them is for Unix/Linux machines and the other one is for MS-Dos or Windows.

  • UNIX/Linux example:

#!/bin/sh

basename = $1

directory = $2

ProblemDirectory = $3

# OutputFile: "$1.log" IT IS USED BY GiD

# ErrorFile: "$1.err" IT IS USED BY GiD

rm -f "$basename.post.res"

"$ProblemDirectory/myprogram" "$basename"

mv "$basename.results" "$basename.post.res"

  • MS-DOS/Windows example:

rem basename=%1 JUST INFORMATIVE

rem directory=%2 JUST INFORMATIVE

rem ProblemDirectory=%3 JUST INFORMATIVE

rem OutputFile: %1.log IT IS USED BY GiD

rem ErrorFile: %1.err IT IS USED BY GiD

del %1.post.res

%3\myprogram %1

move %1.post %1.post.res

bat file examples