Q&A

  • 델파이 4에서 FTP의 구현이 가능한가요?
가능여부만 답변해 주시면 되니까 제발 답변좀 해주세요.

1  COMMENTS
  • Profile
    오병주 2001.09.05 02:05
    이종수 wrote:

    > 가능여부만 답변해 주시면 되니까 제발 답변좀 해주세요.



    =======================================================

    당근이져..^^

    참 그런데 FTP컴퍼넌트를 이용하는건가여..???

    아님 코딩으로 구현하는 건가여..???



    FTP컴퍼넌트로 구현하는것은 가능하죠..

    아주 쉽거든여...

    저는 파일리스트 박스에 있는것을 전부 호스트로 올렸거든요...

    참고하세요...



    NMFTP1.Host := 'HOST IP 주소';

    NMFTP1.TimeOut := 20000;

    NMFTP1.UserID := 'id';

    NMFTP1.Password:= 'Password';

    NMFTP1.Connect;



    // 서버에서 dat라는 가상디렉토리를 만들어 읽기와 쓰기로 설정해놓는다.

    NMFTP1.ChangeDir('dat');



    if FileListBox1.Items.Count >= 1 then

    begin

    for i:=FileListBox1.TopIndex to FileListBox1.Items.Count-1 do

    begin

    if FileListBox1.Items.strings[i] = '' then

    begin

    showmessage('전송하고자 하는 파일이 존재하지 않습니다.');

    break;

    end

    else

    begin

    NMFTP1.Upload(FileListBox1.Items.strings[i],FileListBox1.Items.strings[i]);



    MoveFile(pchar('c:kuntaeserverilmagam'+ FileListBox1.Items.Strings[i]+''),

    pchar('c:kuntaeserverback'+ FileListBox1.Items.Strings[i]+''));

    end;

    end;

    FileListBox1.Update;

    showmessage('파일전송이 완료되었습니다.');

    end

    else

    begin

    showmessage('전송할 파일이 존재하지 않습니다.');

    NMFTP1.Disconnect;

    end;



    이렇게 하면 원하는 곳으로 소~옥 올라감니다...

    제대로 답변이 되었는지...???

    그럼 즐코하세요...