AnsweredAssumed Answered

Python Script: a zip file (“TEST.gbd.zip”) containing a File Geodatabase with feature classes to download over FTP? 

Question asked by apena12 on Aug 24, 2017
Latest reply on Aug 31, 2017 by apena12

There is a zip file (“TEST.gbd.zip”) containing a File Geodatabase with both feature classes from FTP County and I need it to download. What is the python script for this case? Please advise. Thank you.

 

For example, I pulled this part of script like this:  but what about zip file?

# List of Other files to download
# Syntax: County file name with extension separated by colon, then
# the FTP Folder name
CountyOtherFiles = {
'pa_parceldata.dat':r'GISdata/Pa_data/',
'pa_parceldata.txt':r'GISdata/Pa_data/',
'pa_legal_ln.dat':r'GISdata/Pa_data/',
'pa_legal_ln.txt':r'GISdata/Pa_data/',
}

I am new to python script. I have been researched thru here and having difficult to find a right answer. I have compressed zipfile in FTP WinSCP.

I am trying to extract or unzip in python from FTP Winscp? It has compressed zip file in FTP. I have Winscp connect to FTP. I am not sure what is the right script for this case. I already have script set up that has been created by someone else. Please advise. Thank you.

I tried to use this script but I got an error. 

ZipFile.extractall(path='GISData/Pubshp', members= 'PaFiles.gdb.zip')NameError: name 'ZipFile' is not defined

Python Geodatabase

Outcomes