Hi all
I have written a small Python script in 9.2 which copies several shape files to a personal geodatabase within the same directory on C:
The script runs and succesfully copies the shape files except for 1 which it renames in the PGDB by adding _shp to the file name.
The shape file in question is a direct copy of another which copies fine. I have recreated the PGDB and the shape file.
Here's the code but I think something else might be causing this renaming in the GDB. I would live with it however a further script falls over because it can't find the correct file name! This is driving me crazy! Any ideas?
Thanks, Tom
# Create the Geoprocessor
import arcgisscripting
gp = arcgisscripting.create()
# Put in error trapping in case an error occurs when running tool
try:
# Set the workspace
gp.Workspace = "c:/Data"
gp.FeatureClassToGeodatabase("Data1.shp; Data2.shp" , "PGDB.mdb")
except:
# If an error occurred print the message to the screen
print gp.GetMessages()
The file copies to Data1_shp in the GDB!
I have written a small Python script in 9.2 which copies several shape files to a personal geodatabase within the same directory on C:
The script runs and succesfully copies the shape files except for 1 which it renames in the PGDB by adding _shp to the file name.
The shape file in question is a direct copy of another which copies fine. I have recreated the PGDB and the shape file.
Here's the code but I think something else might be causing this renaming in the GDB. I would live with it however a further script falls over because it can't find the correct file name! This is driving me crazy! Any ideas?
Thanks, Tom
# Create the Geoprocessor
import arcgisscripting
gp = arcgisscripting.create()
# Put in error trapping in case an error occurs when running tool
try:
# Set the workspace
gp.Workspace = "c:/Data"
gp.FeatureClassToGeodatabase("Data1.shp; Data2.shp" , "PGDB.mdb")
except:
# If an error occurred print the message to the screen
print gp.GetMessages()
The file copies to Data1_shp in the GDB!