관련 URL#

http://www.devshed.com/c/a/Python/Sockets-in-Python-Into-the-World-of-Python-Network-Programming/

FTP 파일 다운로드#

# -*- coding: utf--*-
from ftplib import FTP
# 서버 접속
ftp = FTP('openframework.or.kr')
# 로그인 정보 셋팅
ftp.login('fromm1', 'xxx')
# 디렉토리 목록을 출력해본다.
ftp. retrlines('LIST')
# 디렉토리 이동
#ftp.cwd('files')
# 확장자가 jsp인 파일의 목록을 추출
fileList=ftp.nlst('*.jsp')
print fileList
for file in fileList:
    command='RETR %s' % file
    print command
    ftp.retrbinary(command, open(file, 'wb').write)
ftp.quit()
print 'file transfer complete'

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-2) was last changed on 05-Oct-2008 23:56 by DongGukLee  
G’day (anonymous guest) My Prefs

Referenced by
Python

JSPWiki v2.8.4