GIS Shape file upload to FTP server

A

Ahmed, Shakir

HI Group,

As I am very new in python field so this question might be very silly to
you but if I get any help is highly appreciated.

Problem:

I wrote a python script which is working fine to upload files to the ftp
server but the problem is it is reducing the actual size after
transferring. I need to upload a GIS Shape file to the ftp server but
want to keep the same size and format. Any idea or help is highly
appreciated.


Thanks

Shakir
Staff Geographer
Sfwmd.gov

The code is as follows:

===================================
# Import system modules



import os
import sys
import win32com.client
import zipfile
import os.path
import ftplib
from ftplib import FTP


ftp=ftplib.FTP("ftp.sfwmd.gov","","")
ftp.login('sahmed','sa1lf1sh')
#ftp.cwd("/export/pub/sahmed")
ffile = open('c:/test/wuppnt.shp', 'r')

ftp.storbinary("STOR wuppnt.shp", ffile)
ffile.close()

print "OK"
ftp.quit()
 

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,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top