[osgeo4w-dev] So does this mean the old non-networked versions
will die?
Matt Wilkie
matt.wilkie at gov.yk.ca
Wed Jun 25 17:15:44 EDT 2008
I believe it works for NT and newer, certainly windows 2000 and newer.
%0 = name of current batch file
%~d0 = Drive letter of "
%~p0 = path of "
%~dp0 = drive and path of "
Full explanation at http://www.ss64.com/ntsyntax/parameters.html
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
Frank Warmerdam wrote:
> Matt Wilkie wrote:
>>> Do you have a pointer to notes on how you setup Portable GIS? I've
>>> only paid passing attention to your efforts so far, but I'd like to
>>> ensure you can provide something similar based on OSGeo4W.
>>
>> For gdal utilities I think it's as simple as replacing "set
>> OSGEO4W_ROOT=C:\OSGeo4W" in osgeo4w.bat with:
>>
>> -----------------
>> rem Root OSGEO4W home dir to the same directory this script exists in
>> set OSGEO4W_ROOT=%~dp0
>> rem Remove trailing backslash
>> set OSGEO4W_ROOT=%OSGEO4W_ROOT:~0,-1%
>> echo OSGEO4W home is %OSGEO4W_ROOT% & echo.
>> -----------------
>
> Matt,
>
> Wow, how does all this "%~dp0" and related stuff work? Does this work on
> any NT or newer cmd.exe shell? Is there a web page or help file or
> something
> I could look at?
>
> Best regards,
More information about the osgeo4w-dev
mailing list