My Name is Kay....

DIY , 먹방 , 개발 , 육아 , 여행 좋아합니다.
AdBlock 사용시 화면이 정상적으로 노출되지 않습니다.
포스팅 관련 문의 및 개발 문의는 Email : wkzkfmxksi@gmail.com

추가 포스팅이 이뤄지지 않는 블로그입니다. 문의는 wkzkfmxksi@gmail.com 으로 연락주세요.
kay
조회 수 5808 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

ASP 에서 사용가능한 FTP 컴포넌트


서버 간 특정 파일을 웹에서 동기화하기 위해 사용할 녀석을 찾던 중 알게된 녀석입니다.

90년에대 개발된 것이라고 하는데 여전히 많이 이용되고 있습니다..


원문 Url : http://www.codeguru.com/vb/vb_internet/article.php/c19511/Creating-an-FTP-Component-in-Visual-Basic.htm

Download : 981203AspFtp.zip


주의 : 클라이언트에서 서버로 사용하는 업로드 컴포넌트가 아닙니다..

서버 로컬에 있는 파일과 타 서버의 FTP 접속과 전송을 할수 있게 해주는 용도입니다.


비슷한 기능의 AspInet.zip 이라는 것도 있네요..( 이건 실제 사용해보지는 않았습니다만.. )


* 사용 가능한 기능 

폴더 생성 및 삭제 

폴더 리스트 가져오기

파일 송수신 및 삭제 

파일 리스트 가져오기

파일 읽어오기

파일명 변경

...

..


자세한 내용은 첨부 파일의 샘플을 확인해주세요.

 

aspftp.dll 파일 등록 하신 후 ..


<%@ LANGUAGE=VBScript %>
<!--#Include File="aspftp2.inc"-->
<%
'check to see if user submitted form
If Request.Form("PutIt") <> "" Then
	Dim objFTP
	Dim strMsg

	'create reference to object
	Set objFTP = Server.CreateObject("NIBLACK.ASPFTP")

	'set the properties for the connection
	objFTP.sServerName = "ftp.microsoft.com"
	objFTP.sUserID = "anonymous"
	objFTP.sPassword = "wally@wallyworld.com"
	
	'connect to the host
	If objFTP.bConnect Then	
		'set the properties for the put function
		objFTP.lTransferType = TRANSFER_TYPE_ASCII

		'now put the file
		If objFTP.bPutFile("c:\test.txt", "test.txt") Then
		    'put was successful
		    strMsg = "Put Successful!"
		Else
		    'put failed...let user know
		    strMsg = "Put Failed: " & objFTP.sError
		End If
	Else
		'connection failed...let user know
		strMsg = "Connection Failed: " & objFTP.sError	
	End If
	    
	'clean up...
	Set objFTP = Nothing
	
Else
	'default return msg
	strMsg = ""
End If
%>

<html>
<body> 
This example uses the Put method (bPutFile). All parameters
required for receiving a file are explicitly defined in the ASP code.<br>
<hr>
<br> 
<%If strMsg <> "" Then%>
Return Message: <%=strMsg%><br>
<hr>
<br>
<%End If%>

<form action="AspFTP2_Put.asp" method="post">
<input type="submit" name="PutIt" value="Put File">
</form>

</body>
</html>



?

  1. ADODB.Stream + ASP에서 파일 다운로드

    Date2013.06.18 Bykay Views7440
    Read More
  2. asp Json 데이터 받기

    Date2013.04.02 Bykay Views10134
    Read More
  3. ASP 에러 체크

    Date2014.11.20 Bykay Views2458
    Read More
  4. ASP 에서 RSS 가져와서 파싱하기

    Date2013.05.22 Bykay Views3499
    Read More
  5. ASP 함수 " HTML 태그 제거하기"

    Date2013.07.31 Bykay Views2786
    Read More
  6. ASPFTP - 컴포넌트를 이용한 ASP 에서 FTP 사용하기

    Date2013.06.13 Bykay Views5808
    Read More
  7. Excel 파일(.xlsx) 읽어서 디비에 넣기

    Date2013.12.08 Bykay Views26051
    Read More
  8. http를 이용한 xml 호출 및 파싱 ( MSXML2.DomDocument )

    Date2013.05.20 Bykay Views3953
    Read More
  9. IIS에서 ASP 날짜 형식 YYYY-MM-DD

    Date2015.08.24 Bykay Views1946
    Read More
  10. response.Cookie Collection , 쿠키 만료일 미지정시 만료일은?

    Date2014.02.20 Bykay Views3138
    Read More
  11. UTF-8 URLDecode 함수

    Date2014.01.28 Bykay Views3150
    Read More
  12. [펌] Request.Form , Request.QueryString 값 확인하기

    Date2014.06.12 Bykay Views1954
    Read More
  13. 동적 변수 선언 및 프로그래밍 " eval , Execute "

    Date2013.03.29 Bykay Views6043
    Read More
  14. 문자열 거꾸로 strReverse

    Date2013.05.13 Bykay Views2502
    Read More
  15. 변수 ByRef , ByVal

    Date2015.12.07 Bykay Views1954
    Read More
  16. 엑셀 다운로드 시 한글 파일명 깨짐 해결

    Date2014.08.07 Bykay Views2893
    Read More
  17. 오늘 본 상품 쿠키로 처리하기

    Date2013.09.13 Bykay Views4325
    Read More
  18. 이미지 사이즈 컴포넌트 "pakImage"

    Date2014.10.20 Bykay Views1720
    Read More
Board Pagination Prev 1 Next
/ 1