I need to copy a set of personal geodatabases from a master directory to a local working directory for processing. Here's my Python code:import osimport shutildirlist=os.listdir("Z:\\COMMON\\GIS\\WORK\\Ron\\NEW")dst="C:\\Arcwork\\parcelmdb"mdblist=[]for item in dirlist:[INDENT] if item.lower().endswith("mdb"): mdblist.append(item)[/INDENT] for db in mdblist:[INDENT] shutil.copyfile(db,dst)[/INDENT]However, when run I get an error: Traceback (most recent call last): File "C:\Arcwork\GetMasterMDBList.py", line 11, in <module> shutil.copyfile(item,dst) File "C:\Python26\ArcGIS10.0\lib\shutil.py", line 52, in copyfile fsrc = open(src, 'rb')IOError: [Errno 2] No such file or directory: 'Bolton.mdb'
mdblist.append(os.path.join("Z:\\COMMON\\GIS\\WORK\\Ron\\NEW", item))
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.