Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I hesitated a bit before asking this, as it isn't necessarily a GIS specific question, though I'm using it to update geodatabases. I have found plenty of hits on a Google search, but frankly, many of the websites out there for .bat files are hacky and not real trustworthy.

Do you have a resource that you use for database manipulation through batch files?

Any GIS/Geodatabase specific resources for .bat's?

A little background, I'm just starting to dabble in batch files. I'm aware that I can automate many things that are done manually, but am terrified of doing anything I shouldn't be doing/cannot undo. I have found introductory sites that don't give much more information than printing to the console. I'm looking for something that goes into detail about databases.

Mods, feel free to move this to another area if this is too objective of a question.

Thanks for your help!

share|improve this question
    
Nope, this is a great question. –  jvangeld Mar 22 '11 at 18:08
    
Thanks everyone for your help. I will be looking into all of these options. –  MaryBeth Mar 22 '11 at 20:41
add comment

3 Answers

I don't have any specific links for you, but I think that you should look into the tools that already exist in ArcGIS Desktop.

Have you looked into using Geoprocessing tools & models via python? A good place to start would be to make your Geoprocessing model & then export the model to Python. You can get more information here:http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002w00000031000000.htm

share|improve this answer
add comment

A good place to start is the OGR toolset. This is a set of command line tools that can interact with spatial databases and could easily be formed into a batch file of commands. The ogr2ogr tool can be used to transform one dataset into another, whilst executing basic select queries or even arbitrary SQL. It acts as a single interface to lots of different types of spatial database.

Most databases have at least some support for executing SQL on the command line. For example using Postgresql you can use the psql with the -c option to execute a single command. This can be chained in a batch file with the shp2pgsql and pgsql2shp commands to load and export data.

share|improve this answer
2  
I agree that OGR can be used well for converting data layers. I would also recommend you look into FWTOOLS which bundles the OGR tools and some other libraries into one easy to use package. I created a very basic python script & UI that you can use to call FWTools very easily from ArcGIS. gis.stackexchange.com/questions/5922/… –  RyanDalton Mar 22 '11 at 18:00
add comment

Here is discussion of scripts (.bat files) for ArcGIS Server on EC2.

Also, .bat files for starting/stopping arcgis services, as describe by Dave Bouwman:

arcstart.bat

net start MSSQLSERVER
net start esri_sde
net start "ESRI Image Server"
net start "ESRIImageServerReporter"
net start "ESRI Image ServiceProvider: 3983"
net start ArcServerObjectManager

arcstop.bat

net stop ArcServerObjectManager
net stop esri_sde
net stop MSSQLSERVER
net stop "ESRIImageServerReporter"
net stop "ESRI Image ServiceProvider: 3983"
net stop "ESRI Image Server"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.