ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/learning/FTP_Testing.py
Revision: 8
Committed: Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges
Content type: text/x-python
File size: 471 byte(s)
Log Message:
Initial Import

File Contents

# Content
1 """
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()