shutil.copyfile problem for GIS data

A

Ahmed, Shakir

Need help to copy a personal geodatabase from one location to another:


Trying to copy a personal geodatabase from one location to another
location where all the users are retrieving data from the second
location:

1. I can copy over the updated personal geodatabase to the working
location and overwrite it, though the file is opened by ArcGIS users
(Local Installation of Arc GIS on the users computers).


2. But problem is that I can't copy over if the same updated
personal geodatabase to the working location, if users uses that same
geodatabase through CITRIX - ArcGIS ( user does not have permission to
edit the data)

3. the python script which I am using as follows:

import shutil
import os

src = "c:\mydata\test\mygeo.mdb"
dst = "v:\updated\data\mygeo.mdb"

shutil.copyfile(src,dst)

I highly appreciate if any one of you can help me and give me a
direction that I can solve this problem.

Thanks in advance.

Shak
 
L

Larry Bates

Need help to copy a personal geodatabase from one location to another:


Trying to copy a personal geodatabase from one location to another
location where all the users are retrieving data from the second
location:

1. I can copy over the updated personal geodatabase to the working
location and overwrite it, though the file is opened by ArcGIS users
(Local Installation of Arc GIS on the users computers).


2. But problem is that I can't copy over if the same updated
personal geodatabase to the working location, if users uses that same
geodatabase through CITRIX - ArcGIS ( user does not have permission to
edit the data)

3. the python script which I am using as follows:

import shutil
import os

src = "c:\mydata\test\mygeo.mdb"
dst = "v:\updated\data\mygeo.mdb"

shutil.copyfile(src,dst)

I highly appreciate if any one of you can help me and give me a
direction that I can solve this problem.

Thanks in advance.

Shak

While I'm uncertain about the exact nature of your problem I can tell you that
the src string you have defined won't work becaust \t is a tab character. To
make shutil.copyfile work you need to do:

src = r"c:\mydata\test\mygeo.mdb"
dst = r"v:\updated\data\mygeo.mdb"

or

src = "c:\\mydata\\test\\mygeo.mdb"
dst = "v:\\updated\\data\\mygeo.mdb"


-Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top