* 사용환경 : 델파이5 / Windows 98
소스 밑부분에 내용이 있으니깐 조언 좀 부탁드립니다...
==================================================================================
procedure TForm1.StartUp;
begin
NMFTP1.Host := 'hostip';
NMFTP1.Port := 21;
NMFTP1.Timeout := 0;
NMFTP1.UserID := 'userid';
NMFTP1.Password := 'pw';
try
NMFTP1.Connect;
except
On E:Exception do
if E.message='something'
then writeln('poo');
end;
//NMFTP1.List;
NMFTP1.Nlist;
//NMFTP1.Download((to_date + IntToStr(cnt)+'.txt'), ('C:A' + (to_date + IntToStr(cnt))+ '.txt'));
end;
procedure TForm1.NMFTP1ListItem(Listing: String);
begin
FileListBox1.Items.Add(Listing);
end;
procedure TForm1.TimerInterfaceTimer(Sender: TObject);
var
license,name: String;
//cnt: Integer;
begin
//cnt := 0;
TimerInterface.Enabled :=false;
TimerInterface.Interval := 30000; //30초 단위
Increase;
TimerInterface.Enabled :=True;
end;//procedure TForm1.TimerInterfaceTimer(Sender: TObject);
procedure TForm1.Increase;
var
i: Integer;
begin
With ListBox1 do
begin
for i := 0 to (ListBox1.Items.Count-1)
begin
NMFTP1.Download(ListBox1.Items.Strings[i], 'C:A'+ ListBox1.Items.Strings[i]);
NMFTP1.Delete(ListBox1.Items.Strings[i]); <===이부분이 에러가 납니다...그럼 Delete함수는 어디에 넣어 주어야 합니까?
그리고 Delete함수에 이렇게ListBox1.Items.Strings[i] 표시 하면 안됩니까?
DbTry;
except begin
StatusBar1.SimpleText := 'Downloading~';
end;
end;
end;
procedure TForm1.DbTry;
begin
for i := 0 to (ListBox1.Items.Count-1) do <==== 이부분도 좀 맞는지 갈켜 주세요!! 이렇게 loop돌리면 되나요??
위에서 에러가 나니깐 이부분이 어찌 되는지....??? ㅡ.ㅡ;;
begin
If FileExists('C:A' + ListBox1.Items.Strings[i]) = True Then <== 이부분은 이상이 없나요?? 이부분에서도 잘 안되는것 같구 파일을 못찾고 있는듯 합니다...
begin
AssignFile(Reader,'C:A' + ListBox1.Items.Strings[i]);
Reset(Reader);
Readln(Reader,S);
end
/////디비에 텍스트 파일 라인별로 읽어서리 작업을 합니다..////
end;
end;
end.
==================================================================================
모르는 부분을 화살표로 해놨습니다... 꼭 고수님들 좀 봐주세요!!!!
초보에게 등불이~~!!
* 에러 메시지 :
도움말(F1)에 보니깐 Delete함수 이렇게 사용하든데요!!!
그 부분만 만나면 계속 에러가 나오든데요!!!
에러메세지는 "550 Permission denied"라고 계속 메세지를 띄우더라고요!!1
에공~~ 아직 이유를 몰겠습니다.. 초보의 길은 멀고도 험하군요!!!