[GRASS-user] g.manual tries to run C:\Program Files\Internet Exporer\iexplore (the 'L' is missing from 'Explorer')

Glynn Clements glynn at gclements.plus.com
Sun Jul 26 12:34:33 EDT 2009


Frank Bilki wrote:

> That worked! Thanks so much for the suggestion.
> 
> I experimented with combining the forward slashes and the full pathname with
> spaces (e.g. C:/Program Files/Internet Explorer/iexplore) and that also
> worked. So it seems the cause was using back-slashes instead of
> forward-slashes.
> 
> I notice that the batch file contains a mixture of back- and
> forward-slashes, e.g.:
> 
> set WINGISBASE=%OSGEO4W_ROOT%/apps/grass/grass-6.4.0svn
> "%WINGISBASE%"\etc\init.bat %*
> 
> Is there a systematic rule for choosing which to use?

Anything that might be used by system() or from within a batch file
needs to use backslashes. The Windows command interpreter uses forward
slashes to indicate switches.

The rest of Windows accepts forward slashes.

OTOH, anything which needs to be used from within a Bourne-shell
script needs to use forward slashes. Also, the GRASS libraries tend to
assume forward slashes; some of this has been fixed, but probably not
all of it.

The issues with backslashes and spaces in filenames are a large part
of the reason that GRASS 7 has almost completely abandoned
Bourne-shell scripts in favour of Python.

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


More information about the grass-user mailing list