ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/learning/FTP_Testing.py
Revision: 591
Committed: Tue Nov 3 22:45:12 2015 UTC (10 years, 4 months ago) by nino.borges
Content type: text/x-python
File size: 471 byte(s)
Log Message:
Moved dir out of main dir.

File Contents

# User Rev Content
1 ninoborges 8 """
2    
3     FTP testing
4    
5     """
6    
7     from ftplib import FTP
8    
9    
10     connection = FTP('sftp.bostonlit.com')
11     connection.login('Eborges','!Concordanc3')
12     #connection.dir()
13     connection.cwd("test")
14     #test = open(r"C:\Test_dir\41248700.tar",'rb')
15     ## ALWAYS make sure to open these files in rb, binary mode. If not it will only copy half.
16     test = open(r"\\ercdis12\admin\share\Manny\wip\Prod.rar",'rb')
17     connection.storbinary("STOR prod.rar",test)
18    
19     test.close()
20     connection.close()