Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[12120] Indy10 idFTPCLient 에러좀 찾아주세요.
이우석 [snr2000] 1799 읽음    2008-07-11 11:54
데보버전을 다운받아 테스트 하는데 자꾸에가 납니다.

Delhi 2007 Indy10 을 사용중입니다.

procedure TfrmMain.actDownloadFileExecute(Sender: TObject);
var
  i : Integer;
  ext,
  s : String;
  b : boolean;
begin
  if lvFiles.Focused then
    begin
      if Assigned(lvFiles.Selected) then
        lbDirectory.ItemIndex := lbDirectory.Items.IndexOf(lvFiles.Selected.Caption)
      else
        lbDirectory.ItemIndex := -1;
    end
  else
      if Assigned(tvFolders.Selected) then
        lbDirectory.ItemIndex := lbDirectory.Items.IndexOf(tvFolders.Selected.Text)
      else
        lbDirectory.ItemIndex := -1;

  i := lbDirectory.ItemIndex;
  if i <> -1 then
    begin
      s := lbDirectory.Items[i];
      i := FTP.Size(s);
      if i = -1 then
        begin
          ChangeFTPDir(s);
        end
      else
        begin
          ext := ExtractFileExt(s);
          SaveFile.Filter := ext + ' files|*' + ext + '|All Files|*.*';
          SaveFile.FileName := s;
          if SaveFile.Execute then
            begin
              b := true;
              if FileExists(SaveFile.FileName) then
                if MessageDlg('File exists overwrite?', mtWarning, [mbYes,mbNo], 0) = mrYes then
                  DeleteFile(SaveFile.FileName);

              if ASCIIText1.Checked then
                FTP.TransferType := ftASCII
              else
                FTP.TransferType := ftBinary;

              if b then
  //여기서 Project IndyFTP.exe raisedy exception class EIDFTPFileAlreadyExists with message:  
  //          Destination file already exists
  // 이라는 에러가 납니다.
                FTP.Get(s, SaveFile.FileName, True, FTP.ResumeSupported);
  //도와주세요. 제발
            end;
        end;
    end
  else
    MessageDlg('You must first select a file to download from the site.', mtWarning, [mbOK], 0);
end;

+ -

관련 글 리스트
12120 Indy10 idFTPCLient 에러좀 찾아주세요. 이우석 1799 2008/07/11
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.