[GRASS-user] Second try, run grass scripts as batch process in Windows

Glynn Clements glynn at gclements.plus.com
Tue Sep 23 07:35:17 EDT 2008


Moritz Lennert wrote:

> > Can anyone give me a clue on how to run GRASS scripts as a batch
> > process on Windows (Native Windows version, 6.3)?
> 
> You have three options:
> 
> - Run a *nix shell (e.g. bash) script in msys. This means launching 
> 'command line GRASS' in msys (IIRC the current installer creates a 
> shortcut for this in the GRASS menu).
> 
> - Write your script as a cmd.exe script.
> 
> - Write your script in a cross-platform language such as Python.

For batch jobs, you need to create a grassrc file containing settings
for GISDBASE, LOCATION_NAME and MAPSET, and set certain environment
variables. The main ones are:

PATH - must include %GISBASE%/bin and %GISBASE%/lib
GISBASE - the directory where GRASS is installed.
GISRC - the pathname of a grassrc file
GRASS_SH - the path to a Unix-compatible Bourne shell (only required
if you need to run shell scripts)

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list