471,338 Members | 1,076 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

shutil.copyfile problem for GIS data


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
Jul 16 '07 #1
1 2586
Ahmed, Shakir wrote:
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
Jul 18 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Hugo Ferreira | last post: by
8 posts views Thread by David Nicolson | last post: by
11 posts views Thread by lucidparadox | last post: by
10 posts views Thread by Robert Dailey | last post: by
reply views Thread by Ahmed, Shakir | last post: by
2 posts views Thread by Lance Hoffmeyer | last post: by
4 posts views Thread by Roopesh | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.