database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
ㆍCache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Cache Q&A 369 게시물 읽기
No. 369
[Cache]FTP로 파일 보내기
작성자
구글그룹스
작성일
2009-03-16 10:08
조회수
5,318

<원문 위치: http://groups.google.com/group/intersystems-public-cache/browse_thread/thread/8b5304021a433bdc# >


Below is some

code snippets from a class I wrote to

handle sending file via ftp:

Set ftp=##class(%Net.FtpSession).%New()

Set stat=ftp.Connect(..server,..username,..passwd)

 

If ..trsfrtype="B" {

        Set stat=ftp.Binary()

        Set Msg=" >Transfer method set to Binary"

 

} Else {


                Set stat=ftp.Ascii()

        Set Msg=" >Transfer method set to Ascii"

 

}


if you need to change directories on the receiving system:

           Set stat=ftp.SetDirectory(..serverdir)

 

When sending the file:

 

If ..filetype="B" {

        Set sf=##class(%FileBinaryStream).%New()

 

} Else {


        Set sf=##class(%FileCharacterStream).%New()

}


Set sf.Filename=FILE

Set SendFile=..sendasname

set stat=ftp.Store(SendFile,sf)

 

If you need to rename the file on the receiving server:

 

               Set stat=ftp.Rename(SendFile,NewName)

 

End your ftp session"

 

      ftp.Logout()

 

hth,

Donnie

 

[Top]
No.
제목
작성자
작성일
조회
372[Cache] 완전초보 질문입니다 ㅠㅠ [2]
한민용
2009-03-17
5063
371[Cache]PDF로 인쇄하기
구글그룹스
2009-03-16
7535
370[Cache-COS]Table 내보내기
구글그룹스
2009-03-16
5195
369[Cache]FTP로 파일 보내기
구글그룹스
2009-03-16
5318
368[Cache].NET에서 Cache 클래스 메소드 호출하기
구글그룹스
2009-03-16
5495
367[펌-블로그]Instersystems Cache 5.2 Object Binding
닷넷가이
2009-03-16
5286
365cache 라이센스확인중에.. [2]
아이키마니아
2009-03-06
5252
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2023 DSN, All rights reserved.
작업시간: 0.048초, 이곳 서비스는
	PostgreSQL v16.1로 자료를 관리합니다