Changes between Initial Version and Version 1 of BatchCreationIndexesForShapefilesOnDOS


Ignore:
Timestamp:
Feb 4, 2012, 9:48:29 AM (12 years ago)
Author:
aperi2007
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BatchCreationIndexesForShapefilesOnDOS

    v1 v1  
     1'''Procedure to create indexes for shapefiles on DOS shell'''[[BR]]
     2
     3I often need to create indexes for shapefiles. The shapefiles are on remote disc and are on many gerarchical folders[[BR]]
     4So I use this simply but surely useful procedure to create the indexes using a dos shell.
     5
     6----
     7Suppose the path to the root filder of shapefile is:[[BR]]
     8
     9F:\folder1\folder2[[BR]]
     10
     11you must run this simply script from a shell dos.[[BR]]
     12
     13{{{
     14for /R F:\folder1\folder2 %f IN (*.shp) do ogrinfo.exe -sql "CREATE SPATIAL INDEX ON %~nf" %f
     15}}}
     16
     17The script start from F:\folder1\folder2 and recurse on all the folder creating the index for every shapefile found and creating shapefile index.
     18
     19Happy indexing.
     20
     21Andrea Peri.
     22
     23